ZBar Bar Code Reader Library  version 0.10
zbargtk.h File Reference
Include dependency graph for zbargtk.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  _ZBarGtk
 
struct  _ZBarGtkClass
 

Macros

#define ZBAR_GTK(obj)
 
#define ZBAR_GTK_CLASS(klass)
 
#define ZBAR_GTK_GET_CLASS(obj)
 
#define ZBAR_IS_GTK(obj)
 
#define ZBAR_IS_GTK_CLASS(klass)
 
#define ZBAR_TYPE_GTK
 SECTION:ZBarGtk : barcode reader GTK+ 2.x widget. More...
 

Typedefs

typedef struct _ZBarGtk ZBarGtk
 
typedef struct _ZBarGtkClass ZBarGtkClass
 

Functions

GType zbar_gtk_get_type (void) G_GNUC_CONST
 
const char * zbar_gtk_get_video_device (ZBarGtk *zbar)
 retrieve the currently opened video device. More...
 
gboolean zbar_gtk_get_video_enabled (ZBarGtk *zbar)
 retrieve the current video enabled state. More...
 
gboolean zbar_gtk_get_video_opened (ZBarGtk *zbar)
 retrieve the current video opened state. More...
 
gboolean zbar_gtk_image_from_pixbuf (zbar_image_t *image, GdkPixbuf *pixbuf)
 utility function to populate a zbar_image_t from a GdkPixbuf. More...
 
GtkWidget * zbar_gtk_new (void)
 zbar_gtk_new: create a new barcode reader widget instance. More...
 
void zbar_gtk_scan_image (ZBarGtk *zbar, GdkPixbuf *image)
 zbar_gtk_scan_image: More...
 
void zbar_gtk_set_video_device (ZBarGtk *zbar, const char *video_device)
 open a new video device. More...
 
void zbar_gtk_set_video_enabled (ZBarGtk *zbar, gboolean video_enabled)
 enable/disable video scanning. More...
 

Macro Definition Documentation

#define ZBAR_GTK_CLASS (   klass)
#define ZBAR_GTK_GET_CLASS (   obj)
#define ZBAR_IS_GTK (   obj)
#define ZBAR_IS_GTK_CLASS (   klass)
#define ZBAR_TYPE_GTK

SECTION:ZBarGtk : barcode reader GTK+ 2.x widget.

zbar/zbargtk.h

embeds a barcode reader directly into a GTK+ based GUI. the widget can process barcodes from a video source (using the ZBarGtk:video-device and ZBarGtk:video-enabled properties) or from individual GdkPixbufs supplied to zbar_gtk_scan_image()

Since: 1.5

Referenced by zbar_gtk_new().

Typedef Documentation

typedef struct _ZBarGtk ZBarGtk
typedef struct _ZBarGtkClass ZBarGtkClass

Function Documentation

GType zbar_gtk_get_type ( void  )

References test_pygtk::info, zbar_gtk_class_init(), and zbar_gtk_init().

Here is the call graph for this function:

const char* zbar_gtk_get_video_device ( ZBarGtk zbar)

retrieve the currently opened video device.

Returns: the current video device or NULL if no device is opened

References _ZBarGtkPrivate::video_device, and ZBAR_GTK_PRIVATE.

gboolean zbar_gtk_get_video_enabled ( ZBarGtk zbar)

retrieve the current video enabled state.

Returns: true if video scanning is currently enabled, false otherwise

References _ZBarGtkPrivate::video_enabled, and ZBAR_GTK_PRIVATE.

Referenced by status_button_toggled(), video_enabled(), and video_opened().

Here is the caller graph for this function:

gboolean zbar_gtk_get_video_opened ( ZBarGtk zbar)

retrieve the current video opened state.

Returns: true if video device is currently opened, false otherwise

References _ZBarGtkPrivate::video_opened, and ZBAR_GTK_PRIVATE.

Referenced by status_button_toggled(), video_enabled(), and video_opened().

Here is the caller graph for this function:

gboolean zbar_gtk_image_from_pixbuf ( zbar_image_t *  image,
GdkPixbuf *  pixbuf 
)

utility function to populate a zbar_image_t from a GdkPixbuf.

the zbar library image destination to populate : the GdkPixbuf source

Returns: TRUE if successful or FALSE if the conversion could not be performed for some reason

References fourcc, scan_image::height, scan_image::width, zbar_gtk_release_pixbuf(), zbar_image_set_data(), zbar_image_set_format(), zbar_image_set_size(), and zbar_image_set_userdata().

Referenced by zbar_gtk_processing_thread().

Here is the call graph for this function:

Here is the caller graph for this function:

GtkWidget* zbar_gtk_new ( void  )

zbar_gtk_new: create a new barcode reader widget instance.

initially has no associated video device or image.

Returns: a new ZBarGtk widget instance

References ZBAR_TYPE_GTK.

Referenced by main().

Here is the caller graph for this function:

void zbar_gtk_scan_image ( ZBarGtk zbar,
GdkPixbuf *  image 
)

zbar_gtk_scan_image:

References _ZBarGtkPrivate::queue, zbar_gtk_new_value(), and ZBAR_GTK_PRIVATE.

Referenced by open_button_clicked().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar_gtk_set_video_device ( ZBarGtk zbar,
const char *  video_device 
)

open a new video device.

: the platform specific name of the device to open. use NULL to close a currently opened device.

Note
since opening a device may take some time, this call will return immediately and the device will be opened asynchronously

References _ZBarGtkPrivate::queue, _ZBarGtkPrivate::video_device, _ZBarGtkPrivate::video_enabled, zbar_gtk_new_value(), and ZBAR_GTK_PRIVATE.

Referenced by video_changed(), and zbar_gtk_set_property().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar_gtk_set_video_enabled ( ZBarGtk zbar,
gboolean  video_enabled 
)

enable/disable video scanning.

: true to enable video scanning, false to disable

has no effect unless a video device is opened

References _ZBarGtkPrivate::queue, _ZBarGtkPrivate::video_enabled, video_enabled(), zbar_gtk_new_value(), and ZBAR_GTK_PRIVATE.

Referenced by status_button_toggled(), and zbar_gtk_set_property().

Here is the call graph for this function:

Here is the caller graph for this function: