Types

Types — Data types and enums.

Synopsis




#define     GNOME_TYPE_SCAN_RANGE
#define     GNOME_TYPE_SCAN_GEOMETRY
#define     GNOME_TYPE_SCAN_CONTEXT_INFO
#define     GNOME_TYPE_SCAN_FORECAST
#define     GNOME_TYPE_SCAN_RESULT
            GnomeScanGeometry;
            GnomeScanArea;
            GnomeScanRange;
            GnomeScanContextInfo;
            GnomeScanForecast;
            GnomeScanResult;
enum        GnomeScanUnit;
enum        GnomeScannerType;
enum        GnomeScannerSource;
union       GnomeScannerOptionConstraint;
GType       gnome_scan_range_get_type       (void);
GType       gnome_scan_geometry_get_type    (void);
GType       gnome_scan_context_info_get_type
                                            (void);
GnomeScanContextInfo* gnome_scan_context_info_copy
                                            (GnomeScanContextInfo *info);
void        gnome_scan_context_info_free    (GnomeScanContextInfo *info);
GType       gnome_scan_result_get_type      (void);
GnomeScanResult* gnome_scan_result_copy     (GnomeScanResult *result);
void        gnome_scan_result_free          (GnomeScanResult *result);
gchar*      gnome_scanner_source_get_title  (GnomeScannerSource source);

Description

Blah.

Details

GNOME_TYPE_SCAN_RANGE

#define GNOME_TYPE_SCAN_RANGE			(gnome_scan_range_get_type ())


GNOME_TYPE_SCAN_GEOMETRY

#define GNOME_TYPE_SCAN_GEOMETRY		(gnome_scan_geometry_get_type ())


GNOME_TYPE_SCAN_CONTEXT_INFO

#define GNOME_TYPE_SCAN_CONTEXT_INFO		(gnome_scan_context_info_get_type ())


GNOME_TYPE_SCAN_FORECAST

#define GNOME_TYPE_SCAN_FORECAST		(gnome_scan_forecast_get_type ())


GNOME_TYPE_SCAN_RESULT

#define GNOME_TYPE_SCAN_RESULT			(gnome_scan_result_get_type ())


GnomeScanGeometry

typedef struct {
  gdouble	width;
  gdouble	height;
} GnomeScanGeometry;

The dimension of an rectangle, but length are store in gdouble.

gdouble width; available width in mm.
gdouble height; available height in mm.

GnomeScanArea

typedef struct {
  gdouble	x;
  gdouble	y;
  gdouble	width;
  gdouble	height;
} GnomeScanArea;

A geometry relative to coordonates.

gdouble x; top left corner X-coordinate
gdouble y; top left corner ordinate
gdouble width; area's width
gdouble height; area's height

GnomeScanRange

typedef struct {
  gdouble	lower;
  gdouble	upper;
  gdouble	step;
} GnomeScanRange;

A range of gdouble using a step. A 0.0 step indicate that no interval are specified.

gdouble lower; minimal value
gdouble upper; maximal value
gdouble step; interval between values

GnomeScanContextInfo

typedef struct {
} GnomeScanContextInfo;

A boxed type that represent the scan option's value to pass to de backend.


GnomeScanForecast

typedef struct {
  GnomeScanGeometry	geometry;
  gsize			size;
  gsize			rowstride;
} GnomeScanForecast;

A structure that hold forecast information about acquisition.

GnomeScanGeometry geometry; image geometry in pixel
gsize size; raw image size in bytes.
gsize rowstride; image rowstride

GnomeScanResult

typedef struct {
  gboolean		preview;
  gdouble		resolution;
  GnomeScannerSource	source;
  GdkPixbuf		*image;
} GnomeScanResult;

A structure representing the result of an acquisition. Since the resolution may be rounded, the resolution field provide the final image resolution.

gboolean preview; wether the result is a preview or a final image.
gdouble resolution; the actual resolution of the final image
GnomeScannerSource source; the source used to scan the image
GdkPixbuf *image; the acquired GdkPixbuf

enum GnomeScanUnit

typedef enum {
  GNOME_SCAN_UNIT_NONE,
  GNOME_SCAN_UNIT_PIXEL,
  GNOME_SCAN_UNIT_BIT,
  GNOME_SCAN_UNIT_MM,
  GNOME_SCAN_UNIT_DPI,
  GNOME_SCAN_UNIT_PERCENT,
  GNOME_SCAN_UNIT_MICROSECOND  
} GnomeScanUnit;

All unit used to dialog with devices.

GNOME_SCAN_UNIT_NONE No unit
GNOME_SCAN_UNIT_PIXEL Pixel
GNOME_SCAN_UNIT_BIT Bit
GNOME_SCAN_UNIT_MM Millimeter
GNOME_SCAN_UNIT_DPI Resolution in dot/inch
GNOME_SCAN_UNIT_PERCENT Percentage
GNOME_SCAN_UNIT_MICROSECOND Microsecond

enum GnomeScannerType

typedef enum {
  GNOME_SCANNER_UNKNOWN,
  GNOME_SCANNER_FLATBED,
  GNOME_SCANNER_MULTI_FUNCTION,
  GNOME_SCANNER_SHEETFED,
  GNOME_SCANNER_HANDHELD,
  GNOME_SCANNER_CARD_READER
} GnomeScannerType;

The various recognized kind of device.

GNOME_SCANNER_UNKNOWN Unknown scanner type
GNOME_SCANNER_FLATBED Flatbed scanner
GNOME_SCANNER_MULTI_FUNCTION All-in-one printer
GNOME_SCANNER_SHEETFED Sheetfed scanner
GNOME_SCANNER_HANDHELD Handheld scanner
GNOME_SCANNER_CARD_READER Business card reader scanner

enum GnomeScannerSource

typedef enum {
  GNOME_SCANNER_SOURCE_NONE,
  GNOME_SCANNER_SOURCE_AUTOMATIC,
  GNOME_SCANNER_SOURCE_FLATBED,
  GNOME_SCANNER_SOURCE_AUTOMATIC_DOCUMENT_FEEDER	/*< desc=Automatic Document Feeder >*/
} GnomeScannerSource;

The supported document source of a scanner device.

GNOME_SCANNER_SOURCE_NONE No source.
GNOME_SCANNER_SOURCE_AUTOMATIC The backend is able to automatically choose the document source.
GNOME_SCANNER_SOURCE_FLATBED A flatbed source is available.
GNOME_SCANNER_SOURCE_AUTOMATIC_DOCUMENT_FEEDER An Automatic Document Feeder is available.

union GnomeScannerOptionConstraint

union GnomeScannerOptionConstraint {
  GSList		*enumeration;
  GnomeScanRange	range;
};

The constraint of an option can be either an enumertion or a range. Use GnomeScannerOptionFlags to know which constraint is used.


gnome_scan_range_get_type ()

GType       gnome_scan_range_get_type       (void);

Returns :

gnome_scan_geometry_get_type ()

GType       gnome_scan_geometry_get_type    (void);

Returns :

gnome_scan_context_info_get_type ()

GType       gnome_scan_context_info_get_type
                                            (void);

Returns :

gnome_scan_context_info_copy ()

GnomeScanContextInfo* gnome_scan_context_info_copy
                                            (GnomeScanContextInfo *info);

Copy a GnomeScanContextInfo.

info : a GnomeScanContextInfo
Returns : a copy of info

gnome_scan_context_info_free ()

void        gnome_scan_context_info_free    (GnomeScanContextInfo *info);

Free a GnomeScanContextInfo


gnome_scan_result_get_type ()

GType       gnome_scan_result_get_type      (void);

Returns :

gnome_scan_result_copy ()

GnomeScanResult* gnome_scan_result_copy     (GnomeScanResult *result);

Copy a GnomeScanResult.

result : a GnomeScanResult
Returns : a copy of result

gnome_scan_result_free ()

void        gnome_scan_result_free          (GnomeScanResult *result);

Free a GnomeScanResult

result : a GnomeScanResult

gnome_scanner_source_get_title ()

gchar*      gnome_scanner_source_get_title  (GnomeScannerSource source);

Return the translated source title.

source : the source value
Returns : the source title string