pike.git/
src/
modules/
SANE/
sane.c
Branch:
Tag:
Non-build tags
All tags
No tags
2000-03-02
2000-03-02 19:22:23 by Per Hedbor <ph@opera.com>
998491d3803723667523edeaf3c2bada2f72fc3f (
68
lines) (+
68
/-
0
)
[
Show
|
Annotate
]
Branch:
7.9
Added some (very sparse) documentation
Rev: src/modules/SANE/sane.c:1.4
29:
#include "../Image/image.h"
+
RCSID("$Id: sane.c,v 1.4 2000/03/02 19:22:23 per Exp $");
+
+
/*
+
**! module SANE
+
**!
+
**! This module enables access to the SANE (Scanner Access Now Easy)
+
**! library from pike
+
**!
+
**! note
+
**! $Id: sane.c,v 1.4 2000/03/02 19:22:23 per Exp $
+
*/
+
static int sane_is_inited; struct scanner
53:
}
+
/*
+
**! method array(mapping) list-scanners()
+
**!
+
**! Returns an array with all available scanners.
+
**!
+
**! Example:
+
**! <pre>
+
**! Pike v0.7 release 120 running Hilfe v2.0 (Incremental Pike Frontend)
+
**! > SANE.list_scanners();
+
**! Result: ({
+
**! ([
+
**! "model":"Astra 1220S ",
+
**! "name":"umax:/dev/scg1f",
+
**! "type":"flatbed scanner",
+
**! "vendor":"UMAX "
+
**! ]),
+
**! ([
+
**! "model":"Astra 1220S ",
+
**! "name":"net:lain.idonex.se:umax:/dev/scg1f",
+
**! "type":"flatbed scanner",
+
**! "vendor":"UMAX "
+
**! ])
+
**! })
+
**!
+
**! </pre>
+
*/
static void f_list_scanners( INT32 args ) { SANE_Device **devices;
165:
f_aggregate_mapping( sp - osp ); }
+
/*
+
**! class Scanner
+
**! Scanner s = Scanner( scanner name )
+
*/
static void f_scanner_create( INT32 args ) { char *name;
175:
error("Failed to open scanner \"%s\"\n", name ); }
+
/*
+
**! function array(mapping) list_options( )
+
*/
static void f_scanner_list_options( INT32 args ) { int i, n;
199:
error("No such option: %s\n", name ); }
+
+
/*
+
**! function void set_option( string name, mixed new_value )
+
**! function void set_option( string name )
+
**! If no value is specified, the option is set to it's default value
+
*/
static void f_scanner_set_option( INT32 args ) { char *name;
242:
push_int( 0 ); }
+
+
/*
+
**! function mixed get_option( string name )
+
*/
static void f_scanner_get_option( INT32 args ) { char *name;
280:
} }
+
/*
+
**! function mapping(string:int) get_parameters( )
+
*/
static void f_scanner_get_parameters( INT32 args ) { SANE_Parameters p;
359:
error("No Image.Image?!\n"); }
+
/*
+
**! function Image.Image simple_scan( )
+
*/
static void f_scanner_simple_scan( INT32 args ) { SANE_Parameters p;
411:
push_object( o ); }
+
/*
+
**! function void row_scan(function(Image.Image,int,Scanner:void) callback)
+
*/
static void f_scanner_row_scan( INT32 args ) { SANE_Parameters p;
553:
} }
+
/*
+
**! function void nonblocking_row_scan(function(Image.Image,int,Scanner,int:void) callback)
+
*/
static void f_scanner_nonblocking_row_scan( INT32 args ) { SANE_Parameters p;