Copyright © Acorn Computers Ltd. 1992       0396,008/FS Issue 1 ****LIVE****

             RISC OS Green Support for Direct-Drive Printers
             ===============================================

                   -----------------------------------------
                   | Drawing No : 0396,008/FS              |
                   |      Issue : 1 ****LIVE****           |
                   |       Date : 5 December 1991          |
                   |     Author : Jonathan Coxhead         |
                   |  Change No : AMR xxxx                 |
                   |     Sheets : x                        |
                   |  Last Issue: x (AMR xxxx of xx.xx.xx) |
                   -----------------------------------------

Introduction
============

   This is the specification for the support to be provided in RISC O S 3
for "direct-drive" printers. A direct-drive printer is defined for this
purpose as one which does not support character printing itself, for example
bare laser engines like the Laser Direct and fax modems.

   This is needed in RISC O S 3 to allow the existing Printer Manager to be
used consistently to drive these printers, with the benefits that it gives
to all printers (queuing, multiple drivers present, multiple output streams
etc).

   Familiarity with the structure of the printer manager front end is
assumed.


Changes to be made
==================

   The printer manager Printers divides into two parts: the "front end"
which handles the user interface parts, the queues, the Connection windows,
and the device-independent part of text printing; and the "back ends" which
handle the interface to the PDriver module, the device-dependent part of
text printing and the Configuration windows.


Changes to the back end of Printers
-----------------------------------

   When a back end is initialised, it will return a version number which is
the version of the front end it knows about (this is similar to the WIMP's
convention). The front end will then only use parts of the interface that
were defined for that version. (This will have no effect until RISC O S
4.00, when the new front end will have to cope with old back ends, just as
WIMP 3.00 copes with applications that know about WIMP 2.00 only).

   The back end will also return new flags indicating capabilities:

   (a) In the psup block - flags applicable to the whole Printer Support class
(i.e. dp, lj, ps, etc):

      bit   interpretation
      ---   --------------
       0    } (already assigned)
       1    }
       2    Back end supplies Connection window
       3    Requires Null_Reason_Code events
       4    Direct drive printing available
       5    }
      ...   } not used
       7    }
       8    }
     ...    } Timeout required for Wimp_PollIdle (if bit 3 set)
      15    }

Back end supplies Connections window
   This is set by back ends for PDriver modules which allow extra
connections not catered for in the standard choices above; for example ones
which drive a fax machine and require a phone number. In this case, the
front end calls the back end to display the Connections window, and passes
all events on that window through to the back end, just as for the
Configuration window. The support class module must provide a template
called 'connections' in its private Resources directory.

Requires Null_Reason_Code events
   If set, the back end will be called on null events. In this time, it can
update the icon bar icon to show printer state, update any private windows
it may have open, including its Connections window if any, to show status
information (eg ready, paper out), printing time, etc.

Direct drive printing available
  When using the front-end-supplied Connnections window, if the direct-drive
option is available, the Connection window is extended to allow choice of
this option. In this case, the front end uses OS_Byte with R0 = 5, R1 = 8
which the module will interpret as a direct-drive selection (OS_Byte with
R0=5 selects the printer driver type, that being passed in R1).

Timeout required for Wimp_PollIdle
   Used to allow the back end to be called at some longer interval than
every single null event. If non-zero, the back end will be called not more
often than once every 10*(timeout)cs. (This allows timings from every 10cs
to once every 25.6s.) If zero, the back end will be called on every null
event deliverd to the Printers application.


Changes to the front end of Printers
------------------------------------

   The front end assumes that any printer can be connected to parallel,
serial, Econet, N F S or file. It will be changed to allow direct-drive to
be selected for those printers that support it, but do not provide their own
Connections window.


Coding Work
===========

   (j) Changing back ends to pass back version number and flags (1 day).
   (ij) Adding back-end-supplied Connections window facility (5 days).
   (iij) Passing null events to back ends that want them (2 days).

Testing
=======
   The code will be tested by a copy of the postscript back end that
provides its own Connections window.

******************************* DOCUMENT ENDS ******************************
