Date: Thu, 21 Nov 91 09:59:49 GMT
From: RMokady (Ran Mokady)
To: JCoxhead
Subject: !Printers, is this enough?
Message-Id: <292B8395@RMokady>

From SonOfEcomail server
Received: by stardust.acorn.co.uk (5.51/Ai1.7)
	id AA14561; Wed, 20 Nov 91 16:25:39 GMT
Received: from oak.acorn.co.uk by acorn.co.uk (4.1/Am32)
	id AA13877; Wed, 20 Nov 91 16:26:42 GMT
Date: Wed, 20 Nov 91 16:20:53 GMT
From: ddevorchik (david de vorchik)
To: (Ran) rmokady
Subject: Chew on this for a while
Message-Id: <292A8B65@ddevorchik>

> $.doc.PrintDirct

Title: !Printers backend support changes
Authors: David De Vorchik
History: 
         20-Nov-91 DDV Created

This document attempts to outline the changes required to !Printers to make
it possible to support direct drive laser printers and fax modems, infact any
dumb device which does not support character printing itself.

Such an interface can be built upon the existing code and does not require
support for any other languages (such as 'C' or Assembler). 

Firstly !Printers (manager) makes assumptions about the back ends and the
back ends are usually written with a specific version of the manager in mind.
The first change I suggest is that when a back end is initialised it passes
back/in a version number of the manager that it expects to use this will aid in the future development of the manager application.

Also, in this call the back end should supply a set of flags, these can
describe which features it needs to support, I suggest the following:

   bit 0 set => call back-end to create output stream
   bit 1 set => don't use text printing for objects
   bit 2 set => back end provides connection window
   bit 8 set => pass all unknown events to back end
   bit 9 set => pass null events to back end.

bit 0 set => indicates that when the manager attempts to open a stream 
             on the required printer device that rather than just attempting
             to open "printer:" it calls the back end, which in turn will
             pass a handle back that should be used - this handle need
             not be a file handle as the back end will get asked to process
             blocks of characters.

bit 1 set => pass unknown objects to the back end to see if it knows
             how to print them, ie. you may print to file which generates
             compressed image data which can only be decoded by special
             software - but does not fall into the PrintType_Odd system.

bit 2 set => when set this bit indicates that rather than the standard
             connection window the back end will supply its own.  As alot
             of direct drive devices do not connect via the standard
             connections, ie. they are a podule then it is better to
             allow the back end to supply this.

             For instance a fax device may decide to supply a connection
             window that buttons for selecting wether the output is to
             file or direct to the modem.  And if it goes to the modem
             then to allow the user to enter a suitble 'phone number.

bit 8 set => pass unknown Wimp messages back to the backend, as a back
             end may supply its own-set of messages.  For instance you
             may have a 'phone book application that when double clicking
             on the phone number it would broadcast so that people could
             take note of it.

bit 9 set => pass null events to the back end, this should probably allow
             the caller the specifiy a frequency so that a PollIdle can
             be performed.

             It is important for some devices to regularly poll their
             controller, for instance the a direct drive laser printer
             may want to give some kind of feed back to the user that
             paper is out.

In some situations the back end will want to know information about the icon
on the icon bar, for instance if the printer wants to pass back information
about the current state of the printer - such as cover open.  This can simply
be limited to giving the back end the ability to specify the validation
string and then giving it the icon handle so that it can toggle the state of
the selected bit.

