ZBar.Gtk¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
the platform specific name of the video device |
||
r/w |
controls streaming from the video device |
||
r |
current opened state of the video device |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Name |
Short Description |
---|---|
emitted when a barcode is decoded from an image. |
|
emitted when a barcode is decoded from an image. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
widget |
r |
Class Details¶
- class ZBar.Gtk(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod image_from_pixbuf(image, pixbuf)¶
- Parameters:
image (
object
orNone
) – the zbar library image destination to populatepixbuf (
GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
source
- Returns:
True
if successful orFalse
if the conversion could not be performed for some reason- Return type:
utility function to populate a zbar_image_t from a
GdkPixbuf.Pixbuf
.
- classmethod new()¶
- Returns:
a new
ZBar.Gtk
widget instance- Return type:
create a new barcode reader widget instance. initially has no associated video device or image.
- get_video_device()¶
-
retrieve the currently opened video device.
- get_video_enabled()¶
- Returns:
true if video scanning is currently enabled, false otherwise
- Return type:
retrieve the current video enabled state.
- get_video_opened()¶
- Returns:
true if video device is currently opened, false otherwise
- Return type:
retrieve the current video opened state.
- request_video_size(width, height)¶
-
set video camera resolution. note this call must be made before video is initialized
- scan_image(image)¶
- Parameters:
image (
GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
used to store the image
- set_video_device(video_device)¶
- Parameters:
video_device (
str
orNone
) – the platform specific name of the device to open. useNone
to close a currently opened device.
open a new video device. note since opening a device may take some time, this call will return immediately and the device will be opened asynchronously
- set_video_enabled(video_enabled)¶
- Parameters:
video_enabled (
bool
) – true to enable video scanning, false to disable
enable/disable video scanning. has no effect unless a video device is opened
- do_scan_image(image) virtual¶
- Parameters:
image (
GdkPixbuf.Pixbuf
) – theGdkPixbuf.Pixbuf
used to store the image
Signal Details¶
- ZBar.Gtk.signals.decoded(gtk, symbol_type, data)¶
- Signal Name:
decoded
- Flags:
- Parameters:
emitted when a barcode is decoded from an image. the symbol type and contained data are provided as separate parameters
- ZBar.Gtk.signals.decoded_text(gtk, text)¶
- Signal Name:
decoded-text
- Flags:
- Parameters:
emitted when a barcode is decoded from an image. the symbol type name is prefixed to the data, separated by a colon
Property Details¶
- ZBar.Gtk.props.video_device¶
-
the platform specific name of the video device
- ZBar.Gtk.props.video_enabled¶
-
controls streaming from the video device