Branch: Tag:

2002-07-28

2002-07-28 23:59:49 by Martin Nilsson <mani@lysator.liu.se>

mirardoc -> autodoc. Someone who actually knows how SANE works should add some information here...

Rev: src/modules/SANE/sane.c:1.12

34:      #define sp Pike_sp    - RCSID("$Id: sane.c,v 1.11 2002/05/19 15:25:24 per Exp $"); + RCSID("$Id: sane.c,v 1.12 2002/07/28 23:59:49 nilsson Exp $");    - /* - **! module SANE - **! - **! This module enables access to the SANE (Scanner Access Now Easy) - **! library from pike - **! - **! note - **! $Id: sane.c,v 1.11 2002/05/19 15:25:24 per Exp $ + /*! @module SANE +  *! +  *! This module enables access to the SANE (Scanner Access Now Easy) +  *! library from pike   */      static int sane_is_inited;
70:   }       - /* - **! 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> + /*! @decl array(mapping) list_scanners() +  *! +  *! Returns an array with all available scanners. +  *! +  *! @example +  *! 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 " +  *! ]) +  *! })   */   static void f_list_scanners( INT32 args )   {
208:    f_aggregate_mapping( sp - osp );   }    - /* - **! class Scanner - **! Scanner s = Scanner( scanner name ) + /*! @class Scanner    */ -  +  + /*! @decl void create(string name) +  */   static void f_scanner_create( INT32 args )   {    char *name;
222:    Pike_error("Failed to open scanner \"%s\"\n", name );   }    - /* - **! method array(mapping) list_options() + /*! @decl array(mapping) list_options() +  *! +  *! This method returns an array where every element is a +  *! mapping, layed out as follows. +  *! +  *! @mapping +  *! @member string "name" +  *! +  *! @member string "title" +  *! +  *! @member string "desc" +  *! +  *! @member string "type" +  *! @string +  *! @value "boolean" +  *! @value "int" +  *! @value "float" +  *! @value "string" +  *! @value "button" +  *! @value "group" +  *! @endstring +  *! @member string "unit" +  *! @string +  *! @value "none" +  *! @value "pixel" +  *! @value "bit" +  *! @value "mm" +  *! @value "dpi" +  *! @value "percent" +  *! @value "microsend" +  *! @endstring +  *! @member int "size" +  *! +  *! @member multiset "cap" +  *! @multiset +  *! @index "soft_select" +  *! @index "hard_select" +  *! @index "emulate" +  *! @index "automatic" +  *! @index "inactive" +  *! @index "advanced" +  *! @endmultiset +  *! @member int(0..0)|mapping "constraint" +  *! Constraints can be of three different types; range, word list or string +  *! list. Constraint contains 0 if there are no constraints. +  *! +  *! @mapping range +  *! @member string "type" +  *! Contains the value "range". +  *! @member int "max" +  *! @member int "min" +  *! @member int "quant" +  *! @endmapping +  *! +  *! @mapping "word list" +  *! @member string "type" +  *! Contains the value "list". +  *! @member array(float|int) "list" +  *! @endmapping +  *! +  *! @mapping "string list" +  *! @member string "type" +  *! Contains the value "list". +  *! @member array(string) "list" +  *! @endmapping +  *! @endmapping   */   static void f_scanner_list_options( INT32 args )   {
250:   }       - /* - **! method void set_option( string name, mixed new_value ) - **! method void set_option( string name ) - **! If no value is specified, the option is set to it's default value + /*! @decl void set_option( string name, mixed new_value ) +  *! @decl 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 )   {
299:   }       - /* - **! method mixed get_option( string name ) + /*! @decl mixed get_option( string name )   */   static void f_scanner_get_option( INT32 args )   {
340:    }   }    - /* - **! method mapping(string:int) get_parameters() + /*! @decl mapping(string:int) get_parameters() +  *! +  *! @returns +  *! @mapping +  *! @member int "format" +  *! @member int "last_frame" +  *! @member int "lines" +  *! @member int "depth" +  *! @member int "pixels_per_line" +  *! @member int "bytes_per_line" +  *! @endmapping   */   static void f_scanner_get_parameters( INT32 args )   {
422:    Pike_error("No Image.Image?!\n");   }    - /* - **! method Image.Image simple_scan() + /*! @decl Image.Image simple_scan()   */   static void f_scanner_simple_scan( INT32 args )   {
477:    push_object( o );   }    - /* - **! method void row_scan(function(Image.Image,int,Scanner:void) callback) + /*! @decl void row_scan(function(Image.Image,int,Scanner:void) callback)   */   static void f_scanner_row_scan( INT32 args )   {
622:    }   }    - /* - **! method void nonblocking_row_scan(function(Image.Image,int,Scanner,int:void) callback) + /*! @decl void nonblocking_row_scan(function(Image.Image,int,Scanner,int:void) callback)   */   static void f_scanner_nonblocking_row_scan( INT32 args )   {
679:    push_int( 0 );   }    + /*! @decl void cancel_scan() +  */   static void f_scanner_cancel_scan( INT32 args )   {    sane_cancel( THIS->h );   }    -  + /*! @endclass +  */ +  + /*! @decl constant FrameGray +  *! @decl constant FrameRGB +  *! @decl constant FrameRed +  *! @decl constant FrameGreen +  *! @decl cosntant FrameBlue +  */ +  + /*! @endmodule +  */ +    static void init_scanner_struct( struct object *p )   {    THIS->h = 0;