home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / SCGetScanLine.z / SCGetScanLine
Encoding:
Text File  |  1998-10-30  |  5.7 KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSCCCCGGGGeeeettttSSSSccccaaaannnnLLLLiiiinnnneeee((((3333))))                 IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                  SSSSCCCCGGGGeeeettttSSSSccccaaaannnnLLLLiiiinnnneeee((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SCGetScanLine, SCGetFD, SCDataReady - retrieving scan data
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccaaaannnnnnnneeeerrrr....hhhh>>>>
  14.  
  15.      iiiinnnntttt SSSSCCCCGGGGeeeettttSSSSccccaaaannnnLLLLiiiinnnneeee((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, lllloooonnnngggg bbbbyyyytttteeeessss))));;;;
  16.  
  17.      iiiinnnntttt SSSSCCCCGGGGeeeettttFFFFDDDD((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss))));;;;
  18.  
  19.      iiiinnnntttt SSSSCCCCDDDDaaaattttaaaaRRRReeeeaaaaddddyyyy((((SSSSCCCCAAAANNNNNNNNEEEERRRR ****ssss))));;;;
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      _S_C_G_e_t_S_c_a_n_L_i_n_e retrieves scan line data.  _s specifies a connection to a
  23.      scanner for which _S_C_S_c_a_n(3) has been called previously.  _b_u_f points to
  24.      memory into which the data will be stored, and _b_y_t_e_s should be set to the
  25.      number of bytes in a scan line as determined by _S_C_G_e_t_S_c_a_n_S_i_z_e(3).
  26.  
  27.      For color planar data, _S_C_G_e_t_S_c_a_n_L_i_n_e will need to be called once for each
  28.      line in each plane of data.  For 100 lines of 24 bit planar RGB data,
  29.      _S_C_G_e_t_S_c_a_n_L_i_n_e will be called a total of 300 times, with the first 100
  30.      calls retrieving the red plane, the second 100 calls retrieving the green
  31.      plane, and the third 100 calls retrieving the blue plane.  For other
  32.      types of data, _S_C_G_e_t_S_c_a_n_L_i_n_e will need to be called once for each line of
  33.      data.  The number of lines can be determined by calling _S_C_G_e_t_S_c_a_n_S_i_z_e(3).
  34.  
  35.      _S_C_G_e_t_S_c_a_n_L_i_n_e cannot be called to retrieve scan data if scanning was
  36.      initiated by a call to _S_C_S_c_a_n_F_D(3).
  37.  
  38.      If scanning was initiated by a call to _S_C_S_c_a_n(3), _S_C_G_e_t_F_D returns a file
  39.      descriptor from which scan data can be read.  This file descriptor can be
  40.      used with the _s_e_l_e_c_t(2) system call to determine when _S_C_G_e_t_S_c_a_n_L_i_n_e(3)
  41.      should be called, or the data can be read directly from the file
  42.      descriptor as an alternative means of retrieving the scan data.
  43.  
  44.      If scanning was initiated by a call to _S_C_S_c_a_n_F_D(3), _S_C_G_e_t_F_D will return
  45.      the file descriptor that was passed to _S_C_S_c_a_n_F_D(3).
  46.  
  47.      _S_C_D_a_t_a_R_e_a_d_y is used to determine whether the scanner driver has prepared
  48.      any data for transfer.  It can be used to determine when _S_C_G_e_t_S_c_a_n_L_i_n_e
  49.      should be called.  It should not be used if scanning was initiated by a
  50.      call to _S_C_S_c_a_n_F_D(3).
  51.  
  52. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  53.      _S_C_G_e_t_S_c_a_n_L_i_n_e returns 0 if successful, and -1 if an error occurs.
  54.  
  55.      _S_C_G_e_t_F_D returns a file descriptor from which scan data may be read if
  56.      scanning was initiated by a call to _S_C_S_c_a_n(3).  If scanning was initiated
  57.      by a call to _S_C_S_c_a_n_F_D, _S_C_G_e_t_F_D returns the file descriptor that was
  58.      passed to _S_C_S_c_a_n_F_D.  If an error occurs, _S_C_G_e_t_F_D returns -1.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSCCCCGGGGeeeettttSSSSccccaaaannnnLLLLiiiinnnneeee((((3333))))                 IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                  SSSSCCCCGGGGeeeettttSSSSccccaaaannnnLLLLiiiinnnneeee((((3333))))
  71.  
  72.  
  73.  
  74.      _S_C_D_a_t_a_R_e_a_d_y returns 1 if data is ready to be retrieved from the scanner.
  75.      0 is returned if data is not ready, and -1 is returned if an error
  76.      occurs.
  77.  
  78.      If the return value of one of these functions indicates that an error has
  79.      occurred, the cause of the error can be determined by inspecting the
  80.      value of the global variable _S_C_e_r_r_n_o.
  81.  
  82. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  83.      _S_C_G_e_t_S_c_a_n_L_i_n_e, _S_C_G_e_t_F_D, and _S_C_D_a_t_a_R_e_a_d_y will fail under the following
  84.      circumstances.
  85.  
  86.      SCESCANFD                _S_C_G_e_t_S_c_a_n_L_i_n_e called after _S_C_S_c_a_n_F_D
  87.  
  88.      SCECOMM                  Error communicating with scanner driver
  89.  
  90. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  91.      _l_i_b_s_c_a_n(3), _S_C_S_c_a_n(3), _S_C_S_c_a_n_F_D(3).
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.