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

zebra.h File Reference

Detailed Description

Zebra Barcode Reader Library C API definition

Definition in file zebra.h.

Go to the source code of this file.

Global library interfaces

enum  zebra_color_e { ZEBRA_SPACE = 0, ZEBRA_BAR = 1 }
enum  zebra_config_e {
enum  zebra_error_e {
enum  zebra_symbol_type_e {
  ZEBRA_UPCE = 11, ZEBRA_UPCA = 12, ZEBRA_EAN13 = 13, ZEBRA_ISBN13 = 14,
  ZEBRA_I25 = 25, ZEBRA_CODE39 = 39, ZEBRA_CODE128 = 128, ZEBRA_SYMBOL = 0x00ff,
  ZEBRA_ADDON2 = 0x0200, ZEBRA_ADDON5 = 0x0500, ZEBRA_ADDON = 0x0700
typedef enum zebra_color_e zebra_color_t
typedef enum zebra_config_e zebra_config_t
typedef enum zebra_error_e zebra_error_t
typedef enum zebra_symbol_type_e zebra_symbol_type_t
int _zebra_error_spew (const void *object, int verbosity)
const char * _zebra_error_string (const void *object, int verbosity)
zebra_error_t _zebra_get_error_code (const void *object)
const char * zebra_get_addon_name (zebra_symbol_type_t sym)
const char * zebra_get_symbol_name (zebra_symbol_type_t sym)
void zebra_increase_verbosity ()
int zebra_parse_config (const char *config_string, zebra_symbol_type_t *symbology, zebra_config_t *config, int *value)
void zebra_set_verbosity (int verbosity)
int zebra_version (unsigned *major, unsigned *minor)

Decoder interface

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

typedef void( zebra_decoder_handler_t )(zebra_decoder_t *decoder)
typedef struct zebra_decoder_s zebra_decoder_t
zebra_symbol_type_t zebra_decode_width (zebra_decoder_t *decoder, unsigned width)
zebra_decoder_tzebra_decoder_create ()
void zebra_decoder_destroy (zebra_decoder_t *decoder)
zebra_color_t zebra_decoder_get_color (const zebra_decoder_t *decoder)
const char * zebra_decoder_get_data (const zebra_decoder_t *decoder)
zebra_symbol_type_t zebra_decoder_get_type (const zebra_decoder_t *decoder)
void * zebra_decoder_get_userdata (const zebra_decoder_t *decoder)
void zebra_decoder_new_scan (zebra_decoder_t *decoder)
static int zebra_decoder_parse_config (zebra_decoder_t *decoder, const char *config_string)
void zebra_decoder_reset (zebra_decoder_t *decoder)
int zebra_decoder_set_config (zebra_decoder_t *decoder, zebra_symbol_type_t symbology, zebra_config_t config, int value)
zebra_decoder_handler_tzebra_decoder_set_handler (zebra_decoder_t *decoder, zebra_decoder_handler_t *handler)
void zebra_decoder_set_userdata (zebra_decoder_t *decoder, void *userdata)

Image interface

stores image data samples along with associated format and size metadata

typedef void( zebra_image_cleanup_handler_t )(zebra_image_t *image)
typedef void( zebra_image_data_handler_t )(zebra_image_t *image, const void *userdata)
typedef struct zebra_image_s zebra_image_t
zebra_image_tzebra_image_convert (const zebra_image_t *image, unsigned long format)
zebra_image_tzebra_image_convert_resize (const zebra_image_t *image, unsigned long format, unsigned width, unsigned height)
zebra_image_tzebra_image_create ()
void zebra_image_destroy (zebra_image_t *image)
const zebra_symbol_tzebra_image_first_symbol (const zebra_image_t *image)
void zebra_image_free_data (zebra_image_t *image)
const void * zebra_image_get_data (const zebra_image_t *image)
unsigned long zebra_image_get_format (const zebra_image_t *image)
unsigned zebra_image_get_height (const zebra_image_t *image)
void * zebra_image_get_userdata (const zebra_image_t *image)
unsigned zebra_image_get_width (const zebra_image_t *image)
zebra_image_tzebra_image_read (char *filename)
void zebra_image_ref (zebra_image_t *image, int refs)
void zebra_image_set_data (zebra_image_t *image, const void *data, unsigned long data_byte_length, zebra_image_cleanup_handler_t *cleanup_hndlr)
void zebra_image_set_format (zebra_image_t *image, unsigned long format)
void zebra_image_set_size (zebra_image_t *image, unsigned width, unsigned height)
void zebra_image_set_userdata (zebra_image_t *image, void *userdata)
int zebra_image_write (const zebra_image_t *image, const char *filebase)

Image Scanner interface

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

typedef struct
zebra_image_scanner_tzebra_image_scanner_create ()
void zebra_image_scanner_destroy (zebra_image_scanner_t *scanner)
void zebra_image_scanner_enable_cache (zebra_image_scanner_t *scanner, int enable)
static int zebra_image_scanner_parse_config (zebra_image_scanner_t *scanner, const char *config_string)
int zebra_image_scanner_set_config (zebra_image_scanner_t *scanner, zebra_symbol_type_t symbology, zebra_config_t config, int value)
zebra_image_data_handler_tzebra_image_scanner_set_data_handler (zebra_image_scanner_t *scanner, zebra_image_data_handler_t *handler, const void *userdata)
int zebra_scan_image (zebra_image_scanner_t *scanner, zebra_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 zebra_processor_s zebra_processor_t
int zebra_process_image (zebra_processor_t *processor, zebra_image_t *image)
int zebra_process_one (zebra_processor_t *processor, int timeout)
zebra_processor_tzebra_processor_create (int threaded)
void zebra_processor_destroy (zebra_processor_t *processor)
static int zebra_processor_error_spew (const zebra_processor_t *processor, int verbosity)
static const char * zebra_processor_error_string (const zebra_processor_t *processor, int verbosity)
int zebra_processor_force_format (zebra_processor_t *processor, unsigned long input_format, unsigned long output_format)
static zebra_error_t zebra_processor_get_error_code (const zebra_processor_t *processor)
int zebra_processor_init (zebra_processor_t *processor, const char *video_device, int enable_display)
int zebra_processor_is_visible (zebra_processor_t *processor)
static int zebra_processor_parse_config (zebra_processor_t *processor, const char *config_string)
int zebra_processor_set_active (zebra_processor_t *processor, int active)
int zebra_processor_set_config (zebra_processor_t *processor, zebra_symbol_type_t symbology, zebra_config_t config, int value)
zebra_image_data_handler_tzebra_processor_set_data_handler (zebra_processor_t *processor, zebra_image_data_handler_t *handler, const void *userdata)
int zebra_processor_set_visible (zebra_processor_t *processor, int visible)
int zebra_processor_user_wait (zebra_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 zebra_scanner_s zebra_scanner_t
static zebra_symbol_type_t zebra_scan_rgb24 (zebra_scanner_t *scanner, unsigned char *rgb)
zebra_symbol_type_t zebra_scan_y (zebra_scanner_t *scanner, int y)
zebra_scanner_tzebra_scanner_create (zebra_decoder_t *decoder)
void zebra_scanner_destroy (zebra_scanner_t *scanner)
zebra_color_t zebra_scanner_get_color (const zebra_scanner_t *scanner)
unsigned zebra_scanner_get_width (const zebra_scanner_t *scanner)
zebra_symbol_type_t zebra_scanner_new_scan (zebra_scanner_t *scanner)
zebra_symbol_type_t zebra_scanner_reset (zebra_scanner_t *scanner)

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 zebra_symbol_s zebra_symbol_t
int zebra_symbol_get_count (const zebra_symbol_t *symbol)
const char * zebra_symbol_get_data (const zebra_symbol_t *symbol)
unsigned zebra_symbol_get_loc_size (const zebra_symbol_t *symbol)
int zebra_symbol_get_loc_x (const zebra_symbol_t *symbol, unsigned index)
int zebra_symbol_get_loc_y (const zebra_symbol_t *symbol, unsigned index)
zebra_symbol_type_t zebra_symbol_get_type (const zebra_symbol_t *symbol)
const zebra_symbol_tzebra_symbol_next (const zebra_symbol_t *symbol)

Video interface

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

typedef struct zebra_video_s zebra_video_t
zebra_video_tzebra_video_create ()
void zebra_video_destroy (zebra_video_t *video)
int zebra_video_enable (zebra_video_t *video, int enable)
static int zebra_video_error_spew (const zebra_video_t *video, int verbosity)
static const char * zebra_video_error_string (const zebra_video_t *video, int verbosity)
static zebra_error_t zebra_video_get_error_code (const zebra_video_t *video)
int zebra_video_get_fd (const zebra_video_t *video)
int zebra_video_get_height (const zebra_video_t *video)
int zebra_video_get_width (const zebra_video_t *video)
int zebra_video_init (zebra_video_t *video, unsigned long format)
zebra_image_tzebra_video_next_image (zebra_video_t *video)
int zebra_video_open (zebra_video_t *video, const char *device)

Window interface

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

typedef struct zebra_window_s zebra_window_t
int zebra_negotiate_format (zebra_video_t *video, zebra_window_t *window)
int zebra_window_attach (zebra_window_t *window, void *x11_display_w32_hwnd, unsigned long x11_drawable)
zebra_window_tzebra_window_create ()
void zebra_window_destroy (zebra_window_t *window)
int zebra_window_draw (zebra_window_t *window, zebra_image_t *image)
static int zebra_window_error_spew (const zebra_window_t *window, int verbosity)
static const char * zebra_window_error_string (const zebra_window_t *window, int verbosity)
static zebra_error_t zebra_window_get_error_code (const zebra_window_t *window)
int zebra_window_redraw (zebra_window_t *window)
int zebra_window_resize (zebra_window_t *window, unsigned width, unsigned height)
void zebra_window_set_overlay (zebra_window_t *window, int level)

Generated by  Doxygen 1.6.0   Back to index