home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1997 / ARCHIVE_97.iso / discs / mag_discs / volume_08 / issue_06 / risc_os / PrintMess < prev    next >
Text File  |  1988-11-02  |  3KB  |  71 lines

  1.  
  2. Message protocol between the printer applications and other applications
  3. (referred to as the client from now on).
  4.  
  5.  
  6. INTRO
  7.  The printer application manages printer selection and printing files in the
  8. background (scheduled on nul events). The following message reasons are
  9. described below.
  10.  
  11. Message_PrintFile       &80140
  12. Message_WillPrint       &80141
  13. Message_PrintSave       &80142
  14. Message_PrintBusy       &80144
  15. Message_PrintTypeOdd    &80145
  16. Message_PrintTypeKnown  &80146
  17.  
  18.  
  19. DRAGGING FILE ICON FROM SAVE BOX OF CLIENT TO PRINTER ICON
  20.  A client can cause the same effect without user intervention by issuing
  21. Message_PrintSave. Which is treated by the printer application in the same way
  22. as DataSave. Except that if the printer is busy the reply Message_PrintBusy is
  23. sent rather than putting up an error box.
  24.  The printer application receives a DataSave message. In case the client can
  25. improve on the default print action the printer application issues the
  26. message Message_PrintFile recorded delivery. The parameter block has
  27.  
  28. 12 reference number of original DataSave message
  29. 40 file type of data
  30. 44 zero terminated scrap filename
  31.  
  32. The client has 3 options
  33.  
  34. 1) It can ignore the broadcast
  35. In this case when the printer application sees the broadcast bounced it
  36. resumes the original protocol with a DataSaveAck. This would be use if the
  37. client uses the same format when saving to a printer as when saving to a
  38. filing system.
  39.  
  40. 2) It can acknowledge the broadcast with Message_WillPrint
  41. In this case the printer application takes no further action. This would be
  42. used if the client wants to handle printing itself.
  43.  
  44. 3) It can save its data to the scrap file and acknowledge the broadcast with
  45. Message_DataLoad. The file type should reflect the new data format if it has
  46. been converted (eg text or PostScript). In this case the printer application
  47. will issue a DataLoadAck and print the scrap file in the background as if
  48. resulting from dragging file icon from filer window (see below).
  49.  
  50.  
  51. DRAGGING FILE ICON FROM FILER WINDOW TO PRINTER ICON
  52.  The printer application receives a DataLoad Message and checks if some sort
  53. of text file. File types FFF, FFE, FEB are considered text as are some
  54. printer specific ones (eg FF5 PostScript). If it is not text it issues the
  55. broadcast message Message_PrintTypeOdd recorded delivery. The parameter block
  56. has
  57.  
  58. 12 0
  59. 40 file type
  60. 44 zero terminated filename
  61.  
  62. If there is client that knows how to print this file type it should
  63. acknowledge with the message Message_PrintTypeKnown. The client can either
  64. print the file itself or put its output to <Printer$Temp> for the printer
  65. application to print in the background. If it uses <Printer$Temp> it should
  66. return the file type of the modified data in offset 40 of the message block.
  67.  
  68. If the broadcast is bounced the printer application will look at
  69. Alias$@PrintType_xxx and if this is unset ask for confirmation from the user.
  70.  
  71.