Logo Search packages:      
Sourcecode: zbar version File versions  Download package

zbar.h File Reference

Detailed Description

ZBar Barcode Reader C API definition

Definition in file zbar.h.

Go to the source code of this file.

Global library interfaces

enum  zbar_color_e { ZBAR_SPACE = 0, ZBAR_BAR = 1 }
enum  zbar_config_e {
enum  zbar_error_e {
enum  zbar_symbol_type_e {
  ZBAR_ISBN10 = 10, ZBAR_UPCA = 12, ZBAR_EAN13 = 13, ZBAR_ISBN13 = 14,
  ZBAR_I25 = 25, ZBAR_CODE39 = 39, ZBAR_PDF417 = 57, ZBAR_QRCODE = 64,
  ZBAR_CODE128 = 128, ZBAR_SYMBOL = 0x00ff, ZBAR_ADDON2 = 0x0200, ZBAR_ADDON5 = 0x0500,
  ZBAR_ADDON = 0x0700
typedef enum zbar_color_e zbar_color_t
typedef enum zbar_config_e zbar_config_t
typedef enum zbar_error_e zbar_error_t
typedef enum zbar_symbol_type_e zbar_symbol_type_t
int _zbar_error_spew (const void *object, int verbosity)
const char * _zbar_error_string (const void *object, int verbosity)
zbar_error_t _zbar_get_error_code (const void *object)
const char * zbar_get_addon_name (zbar_symbol_type_t sym)
const char * zbar_get_symbol_name (zbar_symbol_type_t sym)
void zbar_increase_verbosity (void)
int zbar_parse_config (const char *config_string, zbar_symbol_type_t *symbology, zbar_config_t *config, int *value)
void zbar_set_verbosity (int verbosity)
int zbar_version (unsigned *major, unsigned *minor)

Decoder interface

low-level bar width stream decoder interface. identifies symbols and extracts encoded data

typedef void( zbar_decoder_handler_t )(zbar_decoder_t *decoder)
typedef struct zbar_decoder_s zbar_decoder_t
zbar_symbol_type_t zbar_decode_width (zbar_decoder_t *decoder, unsigned width)
zbar_decoder_tzbar_decoder_create (void)
void zbar_decoder_destroy (zbar_decoder_t *decoder)
zbar_color_t zbar_decoder_get_color (const zbar_decoder_t *decoder)
const char * zbar_decoder_get_data (const zbar_decoder_t *decoder)
unsigned int zbar_decoder_get_data_length (const zbar_decoder_t *decoder)
zbar_symbol_type_t zbar_decoder_get_type (const zbar_decoder_t *decoder)
void * zbar_decoder_get_userdata (const zbar_decoder_t *decoder)
void zbar_decoder_new_scan (zbar_decoder_t *decoder)
static int zbar_decoder_parse_config (zbar_decoder_t *decoder, const char *config_string)
void zbar_decoder_reset (zbar_decoder_t *decoder)
int zbar_decoder_set_config (zbar_decoder_t *decoder, zbar_symbol_type_t symbology, zbar_config_t config, int value)
zbar_decoder_handler_tzbar_decoder_set_handler (zbar_decoder_t *decoder, zbar_decoder_handler_t *handler)
void zbar_decoder_set_userdata (zbar_decoder_t *decoder, void *userdata)

Image interface

stores image data samples along with associated format and size metadata

typedef void( zbar_image_cleanup_handler_t )(zbar_image_t *image)
typedef void( zbar_image_data_handler_t )(zbar_image_t *image, const void *userdata)
typedef struct zbar_image_s zbar_image_t
zbar_image_tzbar_image_convert (const zbar_image_t *image, unsigned long format)
zbar_image_tzbar_image_convert_resize (const zbar_image_t *image, unsigned long format, unsigned width, unsigned height)
zbar_image_tzbar_image_create (void)
void zbar_image_destroy (zbar_image_t *image)
const zbar_symbol_tzbar_image_first_symbol (const zbar_image_t *image)
void zbar_image_free_data (zbar_image_t *image)
const void * zbar_image_get_data (const zbar_image_t *image)
unsigned long zbar_image_get_data_length (const zbar_image_t *img)
unsigned long zbar_image_get_format (const zbar_image_t *image)
unsigned zbar_image_get_height (const zbar_image_t *image)
unsigned zbar_image_get_sequence (const zbar_image_t *image)
const zbar_symbol_set_tzbar_image_get_symbols (const zbar_image_t *image)
void * zbar_image_get_userdata (const zbar_image_t *image)
unsigned zbar_image_get_width (const zbar_image_t *image)
zbar_image_tzbar_image_read (char *filename)
void zbar_image_ref (zbar_image_t *image, int refs)
void zbar_image_set_data (zbar_image_t *image, const void *data, unsigned long data_byte_length, zbar_image_cleanup_handler_t *cleanup_hndlr)
void zbar_image_set_format (zbar_image_t *image, unsigned long format)
void zbar_image_set_sequence (zbar_image_t *image, unsigned sequence_num)
void zbar_image_set_size (zbar_image_t *image, unsigned width, unsigned height)
void zbar_image_set_symbols (zbar_image_t *image, const zbar_symbol_set_t *symbols)
void zbar_image_set_userdata (zbar_image_t *image, void *userdata)
int zbar_image_write (const zbar_image_t *image, const char *filebase)

Image Scanner interface

mid-level image scanner interface. reads barcodes from 2-D images

typedef struct zbar_image_scanner_s zbar_image_scanner_t
zbar_image_scanner_tzbar_image_scanner_create (void)
void zbar_image_scanner_destroy (zbar_image_scanner_t *scanner)
void zbar_image_scanner_enable_cache (zbar_image_scanner_t *scanner, int enable)
const zbar_symbol_set_tzbar_image_scanner_get_results (const zbar_image_scanner_t *scanner)
static int zbar_image_scanner_parse_config (zbar_image_scanner_t *scanner, const char *config_string)
void zbar_image_scanner_recycle_image (zbar_image_scanner_t *scanner, zbar_image_t *image)
int zbar_image_scanner_set_config (zbar_image_scanner_t *scanner, zbar_symbol_type_t symbology, zbar_config_t config, int value)
zbar_image_data_handler_tzbar_image_scanner_set_data_handler (zbar_image_scanner_t *scanner, zbar_image_data_handler_t *handler, const void *userdata)
int zbar_scan_image (zbar_image_scanner_t *scanner, zbar_image_t *image)

Processor interface

high-level self-contained image processor. processes video and images for barcodes, optionally displaying images to a library owned output window

typedef struct zbar_processor_s zbar_processor_t
int zbar_process_image (zbar_processor_t *processor, zbar_image_t *image)
int zbar_process_one (zbar_processor_t *processor, int timeout)
zbar_processor_tzbar_processor_create (int threaded)
void zbar_processor_destroy (zbar_processor_t *processor)
static int zbar_processor_error_spew (const zbar_processor_t *processor, int verbosity)
static const char * zbar_processor_error_string (const zbar_processor_t *processor, int verbosity)
int zbar_processor_force_format (zbar_processor_t *processor, unsigned long input_format, unsigned long output_format)
static zbar_error_t zbar_processor_get_error_code (const zbar_processor_t *processor)
const zbar_symbol_set_tzbar_processor_get_results (const zbar_processor_t *processor)
void * zbar_processor_get_userdata (const zbar_processor_t *processor)
int zbar_processor_init (zbar_processor_t *processor, const char *video_device, int enable_display)
int zbar_processor_is_visible (zbar_processor_t *processor)
static int zbar_processor_parse_config (zbar_processor_t *processor, const char *config_string)
int zbar_processor_request_interface (zbar_processor_t *processor, int version)
int zbar_processor_request_iomode (zbar_processor_t *video, int iomode)
int zbar_processor_request_size (zbar_processor_t *processor, unsigned width, unsigned height)
int zbar_processor_set_active (zbar_processor_t *processor, int active)
int zbar_processor_set_config (zbar_processor_t *processor, zbar_symbol_type_t symbology, zbar_config_t config, int value)
zbar_image_data_handler_tzbar_processor_set_data_handler (zbar_processor_t *processor, zbar_image_data_handler_t *handler, const void *userdata)
void zbar_processor_set_userdata (zbar_processor_t *processor, void *userdata)
int zbar_processor_set_visible (zbar_processor_t *processor, int visible)
int zbar_processor_user_wait (zbar_processor_t *processor, int timeout)

Scanner interface

low-level linear intensity sample stream scanner interface. identifies "bar" edges and measures width between them. optionally passes to bar width decoder

typedef struct zbar_scanner_s zbar_scanner_t
static zbar_symbol_type_t zbar_scan_rgb24 (zbar_scanner_t *scanner, unsigned char *rgb)
zbar_symbol_type_t zbar_scan_y (zbar_scanner_t *scanner, int y)
zbar_scanner_tzbar_scanner_create (zbar_decoder_t *decoder)
void zbar_scanner_destroy (zbar_scanner_t *scanner)
zbar_symbol_type_t zbar_scanner_flush (zbar_scanner_t *scanner)
zbar_color_t zbar_scanner_get_color (const zbar_scanner_t *scanner)
unsigned zbar_scanner_get_edge (const zbar_scanner_t *scn, unsigned offset, int prec)
unsigned zbar_scanner_get_width (const zbar_scanner_t *scanner)
zbar_symbol_type_t zbar_scanner_new_scan (zbar_scanner_t *scanner)
zbar_symbol_type_t zbar_scanner_reset (zbar_scanner_t *scanner)

Symbol Set interface

container for decoded result symbols associated with an image or a composite symbol.

typedef struct zbar_symbol_set_s zbar_symbol_set_t
const zbar_symbol_tzbar_symbol_set_first_symbol (const zbar_symbol_set_t *symbols)
int zbar_symbol_set_get_size (const zbar_symbol_set_t *symbols)
void zbar_symbol_set_ref (const zbar_symbol_set_t *symbols, int refs)

Symbol interface

decoded barcode symbol result object. stores type, data, and image location of decoded symbol. all memory is owned by the library

typedef struct zbar_symbol_s zbar_symbol_t
const zbar_symbol_tzbar_symbol_first_component (const zbar_symbol_t *symbol)
const zbar_symbol_set_tzbar_symbol_get_components (const zbar_symbol_t *symbol)
int zbar_symbol_get_count (const zbar_symbol_t *symbol)
const char * zbar_symbol_get_data (const zbar_symbol_t *symbol)
unsigned int zbar_symbol_get_data_length (const zbar_symbol_t *symbol)
unsigned zbar_symbol_get_loc_size (const zbar_symbol_t *symbol)
int zbar_symbol_get_loc_x (const zbar_symbol_t *symbol, unsigned index)
int zbar_symbol_get_loc_y (const zbar_symbol_t *symbol, unsigned index)
int zbar_symbol_get_quality (const zbar_symbol_t *symbol)
zbar_symbol_type_t zbar_symbol_get_type (const zbar_symbol_t *symbol)
const zbar_symbol_tzbar_symbol_next (const zbar_symbol_t *symbol)
void zbar_symbol_ref (const zbar_symbol_t *symbol, int refs)
char * zbar_symbol_xml (const zbar_symbol_t *symbol, char **buffer, unsigned *buflen)

Video interface

mid-level video source abstraction. captures images from a video device

typedef struct zbar_video_s zbar_video_t
zbar_video_tzbar_video_create (void)
void zbar_video_destroy (zbar_video_t *video)
int zbar_video_enable (zbar_video_t *video, int enable)
static int zbar_video_error_spew (const zbar_video_t *video, int verbosity)
static const char * zbar_video_error_string (const zbar_video_t *video, int verbosity)
static zbar_error_t zbar_video_get_error_code (const zbar_video_t *video)
int zbar_video_get_fd (const zbar_video_t *video)
int zbar_video_get_height (const zbar_video_t *video)
int zbar_video_get_width (const zbar_video_t *video)
int zbar_video_init (zbar_video_t *video, unsigned long format)
zbar_image_tzbar_video_next_image (zbar_video_t *video)
int zbar_video_open (zbar_video_t *video, const char *device)
int zbar_video_request_interface (zbar_video_t *video, int version)
int zbar_video_request_iomode (zbar_video_t *video, int iomode)
int zbar_video_request_size (zbar_video_t *video, unsigned width, unsigned height)

Window interface

mid-level output window abstraction. displays images to user-specified platform specific output window

typedef struct zbar_window_s zbar_window_t
int zbar_negotiate_format (zbar_video_t *video, zbar_window_t *window)
int zbar_window_attach (zbar_window_t *window, void *x11_display_w32_hwnd, unsigned long x11_drawable)
zbar_window_tzbar_window_create (void)
void zbar_window_destroy (zbar_window_t *window)
int zbar_window_draw (zbar_window_t *window, zbar_image_t *image)
static int zbar_window_error_spew (const zbar_window_t *window, int verbosity)
static const char * zbar_window_error_string (const zbar_window_t *window, int verbosity)
static zbar_error_t zbar_window_get_error_code (const zbar_window_t *window)
int zbar_window_get_overlay (const zbar_window_t *window)
int zbar_window_redraw (zbar_window_t *window)
int zbar_window_resize (zbar_window_t *window, unsigned width, unsigned height)
void zbar_window_set_overlay (zbar_window_t *window, int level)

Generated by  Doxygen 1.6.0   Back to index