![]() |
![]() |
![]() |
GNOME Scan Reference Manual | ![]() |
---|---|---|---|---|
GnomeScanner; void gnome_scanner_foreach_options (GnomeScanner *scanner, GHFunc func, gpointer data); GnomeScannerOption* gnome_scanner_find_option (GnomeScanner *scanner, const gchar *name); gpointer gnome_scanner_get_id (GnomeScanner *scanner); const gchar* gnome_scanner_get_vendor (GnomeScanner *scanner); const gchar* gnome_scanner_get_product (GnomeScanner *scanner); GnomeScannerType gnome_scanner_get_scanner_type (GnomeScanner *scanner); GValueArray* gnome_scanner_get_sources (GnomeScanner *scanner); GValueArray* gnome_scanner_get_colorspaces (GnomeScanner *scanner); GValueArray* gnome_scanner_get_depths (GnomeScanner *scanner); GnomeScanGeometry* gnome_scanner_get_geometry (GnomeScanner *scanner); GnomeScanRange* gnome_scanner_get_resolution_range (GnomeScanner *scanner); GValueArray* gnome_scanner_get_resolution_enum (GnomeScanner *scanner);
"colorspaces" GValueArray : Read / Write / Construct Only "depths" GValueArray : Read / Write / Construct Only "geometry" gpointer : Read / Write / Construct Only "id" gpointer : Read / Write / Construct Only "options" gpointer : Read / Write / Construct Only "product" gchararray : Read / Write / Construct Only "resolution-enum" GValueArray : Read / Write "resolution-range" gpointer : Read / Write "sources" GValueArray : Read / Write / Construct Only "type" GnomeScannerType : Read / Write / Construct Only "vendor" gchararray : Read / Write / Construct Only
This object gathers all meta-informations about a devices. It also contains device specific option. Application should use such object only for device listing or for special device configuration tools. Use GnomeScanContext to configure a scan not a device.
typedef struct { const gchar* vendor; const gchar* product; GnomeScannerType type; GnomeScanGeometry* geometry; GValueArray* sources; GValueArray* colorspaces; GValueArray* depths; GnomeScanRange* resolution_range; GValueArray* resolution_enum; GHashTable* options; } GnomeScanner;
void gnome_scanner_foreach_options (GnomeScanner *scanner, GHFunc func, gpointer data);
Retreive each option and apply the function func
with a
GnomeScannerOption and data
as parameter.
scanner : |
a GnomeScanner |
func : |
a GHFunc callback |
data : |
an optional parameter to pass to func
|
GnomeScannerOption* gnome_scanner_find_option (GnomeScanner *scanner, const gchar *name);
Search an option by its name in the lists of options. If the search fail, a NULL pointer is returned.
scanner : |
a GnomeScanner |
name : |
a unique option's name |
Returns : | the corresponding GnomeScannerOption or NULL |
gpointer gnome_scanner_get_id (GnomeScanner *scanner);
Returns the unique id of the device. This function should be called only by GnomeScanBackend.
scanner : |
a GnomeScanner |
Returns : | the device's id |
const gchar* gnome_scanner_get_vendor (GnomeScanner *scanner);
Returns a string describing the device's vendor.
scanner : |
a GnomeScanner |
Returns : | the device's vendor |
const gchar* gnome_scanner_get_product (GnomeScanner *scanner);
Returns a string describing the device's product name.
scanner : |
a GnomeScanner |
Returns : | the product name |
GnomeScannerType gnome_scanner_get_scanner_type (GnomeScanner *scanner);
Return the device type as a string.
scanner : |
a GnomeScanner |
Returns : | the device type |
GValueArray* gnome_scanner_get_sources (GnomeScanner *scanner);
Retrieve available document source on the device.
scanner : |
a GnomeScanner |
Returns : | the availables document sources |
GValueArray* gnome_scanner_get_colorspaces (GnomeScanner *scanner);
Retieve available colorspaces from the device.
scanner : |
a GnomeScanner |
Returns : | The array of available colorspaces |
GValueArray* gnome_scanner_get_depths (GnomeScanner *scanner);
Retrieve available depths from device.
scanner : |
a GnomeScanner |
Returns : | The array of available depths. |
GnomeScanGeometry* gnome_scanner_get_geometry (GnomeScanner *scanner);
Retrieve the geometry of the device, and thus, the max image size.
scanner : |
a GnomeScanner |
Returns : | the device size |
GnomeScanRange* gnome_scanner_get_resolution_range (GnomeScanner *scanner);
Retrieve the range of the available resolution.
scanner : |
a GnomeScanner |
Returns : | the resolution range |
GValueArray* gnome_scanner_get_resolution_enum (GnomeScanner *scanner);
scanner : |
|
Returns : |
colorspaces
" property"colorspaces" GValueArray : Read / Write / Construct Only
Available colorspaces.
geometry
" property"geometry" gpointer : Read / Write / Construct Only
Geometry of the device's scan area in mm.
product
" property"product" gchararray : Read / Write / Construct Only
Device product name.
Default value: "Unknown"
resolution-enum
" property"resolution-enum" GValueArray : Read / Write
Enumeration of available resolutions on the device.
resolution-range
" property"resolution-range" gpointer : Read / Write
Range of available resolutions on the device.
sources
" property"sources" GValueArray : Read / Write / Construct Only
Available document sources on the device.
type
" property"type" GnomeScannerType : Read / Write / Construct Only
Device type.
Default value: GNOME_SCANNER_UNKNOWN