home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / User / h / pdriver < prev    next >
Encoding:
Text File  |  1995-08-21  |  45.2 KB  |  1,355 lines

  1. #ifndef pdriver_H
  2. #define pdriver_H
  3.  
  4. /* C header file for PDriver
  5.  * written by DefMod (Jul 24 1995) on Mon Aug 21 16:13:37 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef draw_H
  18. #include "draw.h"
  19. #endif
  20.  
  21. #ifndef font_H
  22. #include "font.h"
  23. #endif
  24.  
  25. #ifndef messagetrans_H
  26. #include "messagetrans.h"
  27. #endif
  28.  
  29. #ifndef jpeg_H
  30. #include "jpeg.h"
  31. #endif
  32.  
  33. /**********************************
  34.  * SWI names and SWI reason codes *
  35.  **********************************/
  36. #undef  PDriver_Info
  37. #define PDriver_Info                            0x80140
  38. #undef  XPDriver_Info
  39. #define XPDriver_Info                           0xA0140
  40. #undef  PDriver_SetInfo
  41. #define PDriver_SetInfo                         0x80141
  42. #undef  XPDriver_SetInfo
  43. #define XPDriver_SetInfo                        0xA0141
  44. #undef  PDriver_CheckFeatures
  45. #define PDriver_CheckFeatures                   0x80142
  46. #undef  XPDriver_CheckFeatures
  47. #define XPDriver_CheckFeatures                  0xA0142
  48. #undef  PDriver_PageSize
  49. #define PDriver_PageSize                        0x80143
  50. #undef  XPDriver_PageSize
  51. #define XPDriver_PageSize                       0xA0143
  52. #undef  PDriver_SetPageSize
  53. #define PDriver_SetPageSize                     0x80144
  54. #undef  XPDriver_SetPageSize
  55. #define XPDriver_SetPageSize                    0xA0144
  56. #undef  PDriver_SelectJob
  57. #define PDriver_SelectJob                       0x80145
  58. #undef  XPDriver_SelectJob
  59. #define XPDriver_SelectJob                      0xA0145
  60. #undef  PDriver_CurrentJob
  61. #define PDriver_CurrentJob                      0x80146
  62. #undef  XPDriver_CurrentJob
  63. #define XPDriver_CurrentJob                     0xA0146
  64. #undef  PDriver_FontSWI
  65. #define PDriver_FontSWI                         0x80147
  66. #undef  XPDriver_FontSWI
  67. #define XPDriver_FontSWI                        0xA0147
  68. #undef  PDriver_EndJob
  69. #define PDriver_EndJob                          0x80148
  70. #undef  XPDriver_EndJob
  71. #define XPDriver_EndJob                         0xA0148
  72. #undef  PDriver_AbortJob
  73. #define PDriver_AbortJob                        0x80149
  74. #undef  XPDriver_AbortJob
  75. #define XPDriver_AbortJob                       0xA0149
  76. #undef  PDriver_Reset
  77. #define PDriver_Reset                           0x8014A
  78. #undef  XPDriver_Reset
  79. #define XPDriver_Reset                          0xA014A
  80. #undef  PDriver_GiveRectangle
  81. #define PDriver_GiveRectangle                   0x8014B
  82. #undef  XPDriver_GiveRectangle
  83. #define XPDriver_GiveRectangle                  0xA014B
  84. #undef  PDriver_DrawPage
  85. #define PDriver_DrawPage                        0x8014C
  86. #undef  XPDriver_DrawPage
  87. #define XPDriver_DrawPage                       0xA014C
  88. #undef  PDriver_GetRectangle
  89. #define PDriver_GetRectangle                    0x8014D
  90. #undef  XPDriver_GetRectangle
  91. #define XPDriver_GetRectangle                   0xA014D
  92. #undef  PDriver_CancelJob
  93. #define PDriver_CancelJob                       0x8014E
  94. #undef  XPDriver_CancelJob
  95. #define XPDriver_CancelJob                      0xA014E
  96. #undef  PDriver_ScreenDump
  97. #define PDriver_ScreenDump                      0x8014F
  98. #undef  XPDriver_ScreenDump
  99. #define XPDriver_ScreenDump                     0xA014F
  100. #undef  PDriver_EnumerateJobs
  101. #define PDriver_EnumerateJobs                   0x80150
  102. #undef  XPDriver_EnumerateJobs
  103. #define XPDriver_EnumerateJobs                  0xA0150
  104. #undef  PDriver_SetPrinter
  105. #define PDriver_SetPrinter                      0x80151
  106. #undef  XPDriver_SetPrinter
  107. #define XPDriver_SetPrinter                     0xA0151
  108. #undef  PDriver_CancelJobWithError
  109. #define PDriver_CancelJobWithError              0x80152
  110. #undef  XPDriver_CancelJobWithError
  111. #define XPDriver_CancelJobWithError             0xA0152
  112. #undef  PDriver_SelectIllustration
  113. #define PDriver_SelectIllustration              0x80153
  114. #undef  XPDriver_SelectIllustration
  115. #define XPDriver_SelectIllustration             0xA0153
  116. #undef  PDriver_InsertIllustration
  117. #define PDriver_InsertIllustration              0x80154
  118. #undef  XPDriver_InsertIllustration
  119. #define XPDriver_InsertIllustration             0xA0154
  120. #undef  PDriver_DeclareFont
  121. #define PDriver_DeclareFont                     0x80155
  122. #undef  XPDriver_DeclareFont
  123. #define XPDriver_DeclareFont                    0xA0155
  124. #undef  PDriver_DeclareDriver
  125. #define PDriver_DeclareDriver                   0x80156
  126. #undef  XPDriver_DeclareDriver
  127. #define XPDriver_DeclareDriver                  0xA0156
  128. #undef  PDriver_RemoveDriver
  129. #define PDriver_RemoveDriver                    0x80157
  130. #undef  XPDriver_RemoveDriver
  131. #define XPDriver_RemoveDriver                   0xA0157
  132. #undef  PDriver_SelectDriver
  133. #define PDriver_SelectDriver                    0x80158
  134. #undef  XPDriver_SelectDriver
  135. #define XPDriver_SelectDriver                   0xA0158
  136. #undef  PDriver_EnumerateDrivers
  137. #define PDriver_EnumerateDrivers                0x80159
  138. #undef  XPDriver_EnumerateDrivers
  139. #define XPDriver_EnumerateDrivers               0xA0159
  140. #undef  PDriver_MiscOp
  141. #define PDriver_MiscOp                          0x8015A
  142. #undef  XPDriver_MiscOp
  143. #define XPDriver_MiscOp                         0xA015A
  144. #undef  PDriverMiscOp_AddFont
  145. #define PDriverMiscOp_AddFont                   0x0
  146. #undef  PDriverMiscOp_RemoveFont
  147. #define PDriverMiscOp_RemoveFont                0x1
  148. #undef  PDriverMiscOp_EnumerateFonts
  149. #define PDriverMiscOp_EnumerateFonts            0x2
  150. #undef  PDriverMiscOp_RegisterDumper
  151. #define PDriverMiscOp_RegisterDumper            0x80000000
  152. #undef  PDriverMiscOp_DeregisterDumper
  153. #define PDriverMiscOp_DeregisterDumper          0x80000001
  154. #undef  PDriverMiscOp_StripTypes
  155. #define PDriverMiscOp_StripTypes                0x80000002
  156. #undef  PDriver_MiscOpForDriver
  157. #define PDriver_MiscOpForDriver                 0x8015B
  158. #undef  XPDriver_MiscOpForDriver
  159. #define XPDriver_MiscOpForDriver                0xA015B
  160. #undef  PDriverMiscOpForDriver_AddFont
  161. #define PDriverMiscOpForDriver_AddFont          0x0
  162. #undef  PDriverMiscOpForDriver_RemoveFont
  163. #define PDriverMiscOpForDriver_RemoveFont       0x1
  164. #undef  PDriverMiscOpForDriver_EnumerateFonts
  165. #define PDriverMiscOpForDriver_EnumerateFonts   0x2
  166. #undef  PDriverMiscOpForDriver_RegisterDumper
  167. #define PDriverMiscOpForDriver_RegisterDumper   0x80000000
  168. #undef  PDriverMiscOpForDriver_DeregisterDumper
  169. #define PDriverMiscOpForDriver_DeregisterDumper 0x80000001
  170. #undef  PDriverMiscOpForDriver_StripTypes
  171. #define PDriverMiscOpForDriver_StripTypes       0x80000002
  172. #undef  PDriver_SetDriver
  173. #define PDriver_SetDriver                       0x8015C
  174. #undef  XPDriver_SetDriver
  175. #define XPDriver_SetDriver                      0xA015C
  176. #undef  PDriver_JPEGSWI
  177. #define PDriver_JPEGSWI                         0x8015D
  178. #undef  XPDriver_JPEGSWI
  179. #define XPDriver_JPEGSWI                        0xA015D
  180. #undef  PDriverJPEGSWI_Info
  181. #define PDriverJPEGSWI_Info                     0x49980
  182. #undef  PDriverJPEGSWIInfo_Dimensions
  183. #define PDriverJPEGSWIInfo_Dimensions           0x1
  184. #undef  PDriverJPEGSWI_FileInfo
  185. #define PDriverJPEGSWI_FileInfo                 0x49981
  186. #undef  PDriverJPEGSWIFileInfo_Dimensions
  187. #define PDriverJPEGSWIFileInfo_Dimensions       0x1
  188. #undef  PDriverJPEGSWI_PlotScaled
  189. #define PDriverJPEGSWI_PlotScaled               0x49982
  190. #undef  PDriverJPEGSWI_PlotFileScaled
  191. #define PDriverJPEGSWI_PlotFileScaled           0x49983
  192. #undef  PDriverJPEGSWI_PlotTransformed
  193. #define PDriverJPEGSWI_PlotTransformed          0x49984
  194. #undef  PDriverJPEGSWI_PlotFileTransformed
  195. #define PDriverJPEGSWI_PlotFileTransformed      0x49985
  196. #undef  Service_Print
  197. #define Service_Print                           0x41
  198. #undef  Service_PDriverStarting
  199. #define Service_PDriverStarting                 0x65
  200. #undef  Service_PDriverGetMessages
  201. #define Service_PDriverGetMessages              0x78
  202. #undef  Service_PDriverChanged
  203. #define Service_PDriverChanged                  0x7F
  204.  
  205. /************************************
  206.  * Structure and union declarations *
  207.  ************************************/
  208. typedef struct pdriver_message_print_error      pdriver_message_print_error;
  209. typedef struct pdriver_message_print_type_odd   pdriver_message_print_type_odd;
  210. typedef struct pdriver_message_ps_printer_query pdriver_message_ps_printer_query;
  211.  
  212. /********************
  213.  * Type definitions *
  214.  ********************/
  215. typedef int pdriver_type;
  216.  
  217. typedef bits pdriver_features;
  218.  
  219. typedef bits pdriver_font_flags;
  220.  
  221. typedef bits pdriver_font_map_flags;
  222.  
  223. typedef bits pdriver_font_add_flags;
  224.  
  225. typedef bits pdriver_enumerate_flags;
  226.  
  227. struct pdriver_message_print_error
  228.    {  int errnum;
  229.       char errmess [232];
  230.    };
  231.  
  232. struct pdriver_message_print_type_odd
  233.    {  bits file_type;
  234.       char file_name [232];
  235.    };
  236.  
  237. struct pdriver_message_ps_printer_query
  238.    {  byte *buffer;
  239.       int size;
  240.    };
  241.  
  242. typedef bits pdriver_draw_flags;
  243.  
  244. /************************
  245.  * Constant definitions *
  246.  ************************/
  247. #define pdriver_OS_UNIT                         400
  248.       /*1 O S unit in millipoints*/
  249. #define pdriver_INCH                            72000
  250.       /*1in in millipoints*/
  251. #define pdriver_POINT                           1000
  252.       /*1pt in millipoints*/
  253. #define pdriver_TYPE_PS                         ((pdriver_type) 0x0u)
  254. #define pdriver_TYPE_DM                         ((pdriver_type) 0x1u)
  255. #define pdriver_TYPE_LJ                         ((pdriver_type) 0x2u)
  256. #define pdriver_TYPE_IX                         ((pdriver_type) 0x3u)
  257. #define pdriver_TYPE_FX                         ((pdriver_type) 0x4u)
  258. #define pdriver_TYPE_LZ                         ((pdriver_type) 0x5u)
  259. #define pdriver_TYPE_LB                         ((pdriver_type) 0x6u)
  260. #define pdriver_TYPE_UF                         ((pdriver_type) 0x7u)
  261. #define pdriver_TYPE_JX                         ((pdriver_type) 0x63u)
  262. #define pdriver_TYPE_PJ                         ((pdriver_type) 0x63u)
  263. #define pdriver_FEATURE_COLOUR                  ((pdriver_features) 0x1u)
  264. #define pdriver_FEATURE_LIMITED_COLOURS         ((pdriver_features) 0x2u)
  265. #define pdriver_FEATURE_DISCRETE_COLOURS        ((pdriver_features) 0x4u)
  266. #define pdriver_FEATURE_OUTLINES_ONLY           ((pdriver_features) 0x100u)
  267. #define pdriver_FEATURE_THIN_LINES_ONLY         ((pdriver_features) 0x200u)
  268. #define pdriver_FEATURE_NO_OVERWRITE            ((pdriver_features) 0x400u)
  269. #define pdriver_FEATURE_TRFM_SPRITE             ((pdriver_features) 0x800u)
  270. #define pdriver_FEATURE_TRFM_FONT               ((pdriver_features) 0x1000u)
  271. #define pdriver_FEATURE_DRAW_PAGE_FLAGS         ((pdriver_features) 0x2000u)
  272. #define pdriver_FEATURE_SCREEN_DUMP             ((pdriver_features) 0x1000000u)
  273. #define pdriver_FEATURE_GENERAL_TRFM            ((pdriver_features) 0x2000000u)
  274. #define pdriver_FEATURE_INSERT_ILLUSTRATION     ((pdriver_features) 0x4000000u)
  275. #define pdriver_FEATURE_MISC_OP                 ((pdriver_features) 0x8000000u)
  276. #define pdriver_FEATURE_SET_DRIVER              ((pdriver_features) 0x10000000u)
  277. #define pdriver_FEATURE_DECLARE_FONT            ((pdriver_features) 0x20000000u)
  278. #define pdriver_NO_DOWNLOAD                     ((pdriver_font_flags) 0x1u)
  279. #define pdriver_KERNED                          ((pdriver_font_flags) 0x2u)
  280. #define pdriver_FONT_RESIDENT                   ((pdriver_font_map_flags) 0x1u)
  281. #define pdriver_FONT_DOWNLOAD                   ((pdriver_font_map_flags) 0x2u)
  282. #define pdriver_FONT_DOWNLOADED                 ((pdriver_font_map_flags) 0x4u)
  283. #define pdriver_FONT_OVERWRITE                  ((pdriver_font_add_flags) 0x1u)
  284. #define error_PDRIVER_BAD_FEATURES              0x5C0u
  285. #define error_PDRIVER_NO_CURRENT_SPRITE         0x5C1u
  286. #define error_PDRIVER_NO_JOB_SELECTED           0x5C2u
  287. #define error_PDRIVER_NO_SUCH_JOB               0x5C3u
  288. #define error_PDRIVER_NO_CURRENT_PAGE           0x5C4u
  289. #define error_PDRIVER_PRINTING_PAGE             0x5C5u
  290. #define error_PDRIVER_INVALID_COPIES            0x5C6u
  291. #define error_PDRIVER_CANNOT_HANDLE             0x5C7u
  292. #define error_PDRIVER_BAD_HALFTONE              0x5C8u
  293. #define error_PDRIVER_CANCELLED                 0x5C9u
  294. #define error_PDRIVER_SINGULAR_MATRIX           0x5CAu
  295. #define error_PDRIVER_BAD_RECTANGLE             0x5CBu
  296. #define error_PDRIVER_RECTANGLES_MISS           0x5CCu
  297. #define error_PDRIVER_NO_FREE_MEMORY            0x5CDu
  298. #define error_PDRIVER_NOT_ONE_PAGE              0x5CEu
  299. #define error_PDRIVER_IN_USE                    0x5CFu
  300. #define error_PDRIVER_OVERFLOW                  0x5D0u
  301. #define error_PDRIVER_BAD_MISC_OP               0x5D1u
  302. #define error_PDRIVER_NO_DUPLICATES             0x5D2u
  303. #define error_PDRIVER_NO_CURRENT_DRIVER         0x5D3u
  304. #define error_PDRIVER_UNKNOWN_NUMBER            0x5D4u
  305. #define error_PDRIVER_DUPLICATE_NUMBER          0x5D5u
  306. #define error_PDRIVER_BAD_SET_PRINTER           0x5D6u
  307. #define message_PRINT_FILE                      0x80140u
  308. #define message_WILL_PRINT                      0x80141u
  309. #define message_PRINT_SAVE                      0x80142u
  310. #define message_PRINT_INIT                      0x80143u
  311. #define message_PRINT_ERROR                     0x80144u
  312. #define message_PRINT_TYPE_ODD                  0x80145u
  313. #define message_PRINT_TYPE_KNOWN                0x80146u
  314. #define message_SET_PRINTER                     0x80147u
  315. #define message_PRINT_INIT2                     0x80148u
  316. #define message_PS_PRINTER_QUERY                0x8014Cu
  317. #define message_PS_PRINTER_ACK                  0x8014Du
  318. #define message_PS_PRINTER_MODIFIED             0x8014Eu
  319. #define message_PS_PRINTER_DEFAULTS             0x8014Fu
  320. #define message_PS_PRINTER_DEFAULTED            0x80150u
  321. #define message_PS_PRINTER_NOT_PS               0x80151u
  322. #define message_RESET_PRINTER                   0x80152u
  323. #define message_PS_IS_FONTPRINT_RUNNING         0x80153u
  324. #define pdriver_DRAW_COPY_COUNT                 ((pdriver_draw_flags) 0xFFFFFFu)
  325. #define pdriver_DRAW_MAY_PRESCAN                ((pdriver_draw_flags) 0x1000000u)
  326.  
  327. /*************************
  328.  * Function declarations *
  329.  *************************/
  330.  
  331. #ifdef __cplusplus
  332.    extern "C" {
  333. #endif
  334.  
  335. /* ------------------------------------------------------------------------
  336.  * Function:      pdriver_info()
  337.  *
  338.  * Description:   Gets information on the printer manager
  339.  *
  340.  * Output:        type - value of R0 on exit
  341.  *                xres - value of R1 on exit
  342.  *                yres - value of R2 on exit
  343.  *                features - value of R3 on exit
  344.  *                desc - value of R4 on exit
  345.  *                halftone_xres - value of R5 on exit
  346.  *                halftone_yres - value of R6 on exit
  347.  *                printer - value of R7 on exit
  348.  *
  349.  * Other notes:   Calls SWI 0x80140.
  350.  */
  351.  
  352. extern os_error *xpdriver_info (pdriver_type *type,
  353.       int *xres,
  354.       int *yres,
  355.       pdriver_features *features,
  356.       char **desc,
  357.       int *halftone_xres,
  358.       int *halftone_yres,
  359.       int *printer);
  360. extern void pdriver_info (pdriver_type *type,
  361.       int *xres,
  362.       int *yres,
  363.       pdriver_features *features,
  364.       char **desc,
  365.       int *halftone_xres,
  366.       int *halftone_yres,
  367.       int *printer);
  368.  
  369. /* ------------------------------------------------------------------------
  370.  * Function:      pdriver_set_info()
  371.  *
  372.  * Description:   Configures the printer driver
  373.  *
  374.  * Input:         xres - value of R1 on entry
  375.  *                yres - value of R2 on entry
  376.  *                features - value of R3 on entry
  377.  *                pdumper_name - value of R5 on entry
  378.  *                pdumper_no - value of R6 on entry
  379.  *                printer - value of R7 on entry
  380.  *
  381.  * Other notes:   Calls SWI 0x80141.
  382.  */
  383.  
  384. extern os_error *xpdriver_set_info (int xres,
  385.       int yres,
  386.       pdriver_features features,
  387.       char const *pdumper_name,
  388.       int pdumper_no,
  389.       int printer);
  390. extern void pdriver_set_info (int xres,
  391.       int yres,
  392.       pdriver_features features,
  393.       char const *pdumper_name,
  394.       int pdumper_no,
  395.       int printer);
  396.  
  397. /* ------------------------------------------------------------------------
  398.  * Function:      pdriver_check_features()
  399.  *
  400.  * Description:   Checks the features of a printer
  401.  *
  402.  * Input:         features - value of R0 on entry
  403.  *                value - value of R1 on entry
  404.  *
  405.  * Other notes:   Calls SWI 0x80142.
  406.  */
  407.  
  408. extern os_error *xpdriver_check_features (pdriver_features features,
  409.       pdriver_features value);
  410. __swi (0x80142) void pdriver_check_features (pdriver_features features,
  411.       pdriver_features value);
  412.  
  413. /* ------------------------------------------------------------------------
  414.  * Function:      pdriver_page_size()
  415.  *
  416.  * Description:   Finds how large the paper and printable area are
  417.  *
  418.  * Output:        xsize - value of R1 on exit
  419.  *                ysize - value of R2 on exit
  420.  *                left - value of R3 on exit
  421.  *                bottom - value of R4 on exit
  422.  *                right - value of R5 on exit
  423.  *                top - value of R6 on exit
  424.  *
  425.  * Other notes:   Calls SWI 0x80143.
  426.  */
  427.  
  428. extern os_error *xpdriver_page_size (int *xsize,
  429.       int *ysize,
  430.       int *left,
  431.       int *bottom,
  432.       int *right,
  433.       int *top);
  434. extern void pdriver_page_size (int *xsize,
  435.       int *ysize,
  436.       int *left,
  437.       int *bottom,
  438.       int *right,
  439.       int *top);
  440.  
  441. /* ------------------------------------------------------------------------
  442.  * Function:      pdriver_set_page_size()
  443.  *
  444.  * Description:   Sets how large the paper and printable area are
  445.  *
  446.  * Input:         xsize - value of R1 on entry
  447.  *                ysize - value of R2 on entry
  448.  *                left - value of R3 on entry
  449.  *                bottom - value of R4 on entry
  450.  *                right - value of R5 on entry
  451.  *                top - value of R6 on entry
  452.  *
  453.  * Other notes:   Calls SWI 0x80144.
  454.  */
  455.  
  456. extern os_error *xpdriver_set_page_size (int xsize,
  457.       int ysize,
  458.       int left,
  459.       int bottom,
  460.       int right,
  461.       int top);
  462. extern void pdriver_set_page_size (int xsize,
  463.       int ysize,
  464.       int left,
  465.       int bottom,
  466.       int right,
  467.       int top);
  468.  
  469. /* ------------------------------------------------------------------------
  470.  * Function:      pdriver_select_job()
  471.  *
  472.  * Description:   Makes a given print job the current one
  473.  *
  474.  * Input:         job - value of R0 on entry
  475.  *                title - value of R1 on entry
  476.  *
  477.  * Output:        old_job - value of R0 on exit (X version only)
  478.  *
  479.  * Returns:       R0 (non-X version only)
  480.  *
  481.  * Other notes:   Calls SWI 0x80145.
  482.  */
  483.  
  484. extern os_error *xpdriver_select_job (os_f job,
  485.       char const *title,
  486.       os_f *old_job);
  487. extern os_f pdriver_select_job (os_f job,
  488.       char const *title);
  489.  
  490. /* ------------------------------------------------------------------------
  491.  * Function:      pdriver_current_job()
  492.  *
  493.  * Description:   Gets the file handle of the current job
  494.  *
  495.  * Output:        job - value of R0 on exit (X version only)
  496.  *
  497.  * Returns:       R0 (non-X version only)
  498.  *
  499.  * Other notes:   Calls SWI 0x80146.
  500.  */
  501.  
  502. extern os_error *xpdriver_current_job (os_f *job);
  503. __swi (0x80146) os_f pdriver_current_job (void);
  504.  
  505. /* ------------------------------------------------------------------------
  506.  * Function:      pdriver_end_job()
  507.  *
  508.  * Description:   Ends a print job normally
  509.  *
  510.  * Input:         job - value of R0 on entry
  511.  *
  512.  * Other notes:   Calls SWI 0x80148.
  513.  */
  514.  
  515. extern os_error *xpdriver_end_job (os_f job);
  516. __swi (0x80148) void pdriver_end_job (os_f job);
  517.  
  518. /* ------------------------------------------------------------------------
  519.  * Function:      pdriver_abort_job()
  520.  *
  521.  * Description:   Ends a print job without any further output
  522.  *
  523.  * Input:         job - value of R0 on entry
  524.  *
  525.  * Other notes:   Calls SWI 0x80149.
  526.  */
  527.  
  528. extern os_error *xpdriver_abort_job (os_f job);
  529. __swi (0x80149) void pdriver_abort_job (os_f job);
  530.  
  531. /* ------------------------------------------------------------------------
  532.  * Function:      pdriver_reset()
  533.  *
  534.  * Description:   Aborts all print jobs
  535.  *
  536.  * Other notes:   Calls SWI 0x8014A.
  537.  */
  538.  
  539. extern os_error *xpdriver_reset (void);
  540. __swi (0x8014A) void pdriver_reset (void);
  541.  
  542. /* ------------------------------------------------------------------------
  543.  * Function:      pdriver_give_rectangle()
  544.  *
  545.  * Description:   Specifies a rectangle to be printed
  546.  *
  547.  * Input:         id - value of R0 on entry
  548.  *                rect - value of R1 on entry
  549.  *                trfm - value of R2 on entry
  550.  *                pos - value of R3 on entry
  551.  *                bg - value of R4 on entry
  552.  *
  553.  * Other notes:   Calls SWI 0x8014B.
  554.  */
  555.  
  556. extern os_error *xpdriver_give_rectangle (int id,
  557.       os_box const *rect,
  558.       os_hom_trfm const *trfm,
  559.       os_coord const *pos,
  560.       os_colour bg);
  561. extern void pdriver_give_rectangle (int id,
  562.       os_box const *rect,
  563.       os_hom_trfm const *trfm,
  564.       os_coord const *pos,
  565.       os_colour bg);
  566.  
  567. /* ------------------------------------------------------------------------
  568.  * Function:      pdriver_draw_page()
  569.  *
  570.  * Description:   Called to draw the page after all rectangles have been
  571.  *                specified
  572.  *
  573.  * Input:         copies_and_flags - value of R0 on entry
  574.  *                rect - value of R1 on entry
  575.  *                page - value of R2 on entry
  576.  *                page_no - value of R3 on entry
  577.  *
  578.  * Output:        more - value of R0 on exit (X version only)
  579.  *                id - value of R2 on exit
  580.  *
  581.  * Returns:       R0 (non-X version only)
  582.  *
  583.  * Other notes:   Calls SWI 0x8014C.
  584.  */
  585.  
  586. extern os_error *xpdriver_draw_page (pdriver_draw_flags copies_and_flags,
  587.       os_box *rect,
  588.       int page,
  589.       char const *page_no,
  590.       bool *more,
  591.       int *id);
  592. extern bool pdriver_draw_page (pdriver_draw_flags copies_and_flags,
  593.       os_box *rect,
  594.       int page,
  595.       char const *page_no,
  596.       int *id);
  597.  
  598. /* ------------------------------------------------------------------------
  599.  * Function:      pdriver_get_rectangle()
  600.  *
  601.  * Description:   Gets the next print rectangle
  602.  *
  603.  * Input:         rect - value of R1 on entry
  604.  *
  605.  * Output:        more - value of R0 on exit (X version only)
  606.  *                id - value of R2 on exit
  607.  *
  608.  * Returns:       R0 (non-X version only)
  609.  *
  610.  * Other notes:   Calls SWI 0x8014D.
  611.  */
  612.  
  613. extern os_error *xpdriver_get_rectangle (os_box *rect,
  614.       bool *more,
  615.       int *id);
  616. extern bool pdriver_get_rectangle (os_box *rect,
  617.       int *id);
  618.  
  619. /* ------------------------------------------------------------------------
  620.  * Function:      pdriver_cancel_job()
  621.  *
  622.  * Description:   Stops a print job from printing
  623.  *
  624.  * Input:         job - value of R0 on entry
  625.  *
  626.  * Other notes:   Calls SWI 0x8014E.
  627.  */
  628.  
  629. extern os_error *xpdriver_cancel_job (os_f job);
  630. __swi (0x8014E) void pdriver_cancel_job (os_f job);
  631.  
  632. /* ------------------------------------------------------------------------
  633.  * Function:      pdriver_screen_dump()
  634.  *
  635.  * Description:   Outputs a screen dump to the printer
  636.  *
  637.  * Input:         job - value of R0 on entry
  638.  *
  639.  * Other notes:   Calls SWI 0x8014F.
  640.  */
  641.  
  642. extern os_error *xpdriver_screen_dump (os_f job);
  643. __swi (0x8014F) void pdriver_screen_dump (os_f job);
  644.  
  645. /* ------------------------------------------------------------------------
  646.  * Function:      pdriver_enumerate_jobs()
  647.  *
  648.  * Description:   Lists existing print jobs
  649.  *
  650.  * Input:         context - value of R0 on entry
  651.  *
  652.  * Output:        context_out - value of R0 on exit (X version only)
  653.  *
  654.  * Returns:       R0 (non-X version only)
  655.  *
  656.  * Other notes:   Calls SWI 0x80150.
  657.  */
  658.  
  659. extern os_error *xpdriver_enumerate_jobs (int context,
  660.       int *context_out);
  661. __swi (0x80150) int pdriver_enumerate_jobs (int context);
  662.  
  663. /* ------------------------------------------------------------------------
  664.  * Function:      pdriver_cancel_job_with_error()
  665.  *
  666.  * Description:   Cancels a print job - future attempts to output to it are
  667.  *                errors
  668.  *
  669.  * Input:         job - value of R0 on entry
  670.  *                error - value of R1 on entry
  671.  *
  672.  * Other notes:   Calls SWI 0x80152.
  673.  */
  674.  
  675. extern os_error *xpdriver_cancel_job_with_error (os_f job,
  676.       os_error const *error);
  677. __swi (0x80152) void pdriver_cancel_job_with_error (os_f job,
  678.       os_error const *error);
  679.  
  680. /* ------------------------------------------------------------------------
  681.  * Function:      pdriver_select_illustration()
  682.  *
  683.  * Description:   Makes the given print job the current one, and treats it
  684.  *                as an illustration
  685.  *
  686.  * Input:         job - value of R0 on entry
  687.  *                title - value of R1 on entry
  688.  *
  689.  * Output:        old_job - value of R0 on exit (X version only)
  690.  *
  691.  * Returns:       R0 (non-X version only)
  692.  *
  693.  * Other notes:   Calls SWI 0x80153.
  694.  */
  695.  
  696. extern os_error *xpdriver_select_illustration (os_f job,
  697.       char const *title,
  698.       os_f *old_job);
  699. __swi (0x80153) os_f pdriver_select_illustration (os_f job,
  700.       char const *title);
  701.  
  702. /* ------------------------------------------------------------------------
  703.  * Function:      pdriver_insert_illustration()
  704.  *
  705.  * Description:   Inserts a file containing an illustration into the
  706.  *                current job's output
  707.  *
  708.  * Input:         job - value of R0 on entry
  709.  *                clip_path - value of R1 on entry
  710.  *                x0 - value of R2 on entry
  711.  *                y0 - value of R3 on entry
  712.  *                x1 - value of R4 on entry
  713.  *                y1 - value of R5 on entry
  714.  *                x2 - value of R6 on entry
  715.  *                y2 - value of R7 on entry
  716.  *
  717.  * Other notes:   Calls SWI 0x80154.
  718.  */
  719.  
  720. extern os_error *xpdriver_insert_illustration (os_f job,
  721.       draw_path const *clip_path,
  722.       int x0,
  723.       int y0,
  724.       int x1,
  725.       int y1,
  726.       int x2,
  727.       int y2);
  728. extern void pdriver_insert_illustration (os_f job,
  729.       draw_path const *clip_path,
  730.       int x0,
  731.       int y0,
  732.       int x1,
  733.       int y1,
  734.       int x2,
  735.       int y2);
  736.  
  737. /* ------------------------------------------------------------------------
  738.  * Function:      pdriver_declare_font()
  739.  *
  740.  * Description:   Declares the fonts that will be used in a document
  741.  *
  742.  * Input:         font - value of R0 on entry
  743.  *                font_name - value of R1 on entry
  744.  *                flags - value of R2 on entry
  745.  *
  746.  * Other notes:   Calls SWI 0x80155.
  747.  */
  748.  
  749. extern os_error *xpdriver_declare_font (font_f font,
  750.       char const *font_name,
  751.       pdriver_font_flags flags);
  752. __swi (0x80155) void pdriver_declare_font (font_f font,
  753.       char const *font_name,
  754.       pdriver_font_flags flags);
  755.  
  756. /* ------------------------------------------------------------------------
  757.  * Function:      pdriver_declare_driver()
  758.  *
  759.  * Description:   Registers a printer driver with the PDriver sharer module
  760.  *
  761.  * Input:         reason - value of R0 on entry
  762.  *                workspace - value of R1 on entry
  763.  *                type - value of R2 on entry
  764.  *
  765.  * Other notes:   Calls SWI 0x80156.
  766.  */
  767.  
  768. extern os_error *xpdriver_declare_driver (int reason,
  769.       void *workspace,
  770.       pdriver_type type);
  771. __swi (0x80156) void pdriver_declare_driver (int reason,
  772.       void *workspace,
  773.       pdriver_type type);
  774.  
  775. /* ------------------------------------------------------------------------
  776.  * Function:      pdriver_remove_driver()
  777.  *
  778.  * Description:   Deregisters a printer driver with the PDriver sharer
  779.  *                module
  780.  *
  781.  * Input:         type - value of R0 on entry
  782.  *
  783.  * Other notes:   Calls SWI 0x80157.
  784.  */
  785.  
  786. extern os_error *xpdriver_remove_driver (pdriver_type type);
  787. __swi (0x80157) void pdriver_remove_driver (pdriver_type type);
  788.  
  789. /* ------------------------------------------------------------------------
  790.  * Function:      pdriver_select_driver()
  791.  *
  792.  * Description:   Selects the specified printer driver
  793.  *
  794.  * Input:         type - value of R0 on entry
  795.  *
  796.  * Output:        old_type - value of R0 on exit (X version only)
  797.  *
  798.  * Returns:       R0 (non-X version only)
  799.  *
  800.  * Other notes:   Calls SWI 0x80158.
  801.  */
  802.  
  803. extern os_error *xpdriver_select_driver (pdriver_type type,
  804.       pdriver_type *old_type);
  805. __swi (0x80158) pdriver_type pdriver_select_driver (pdriver_type type);
  806.  
  807. /* ------------------------------------------------------------------------
  808.  * Function:      pdriver_enumerate_drivers()
  809.  *
  810.  * Description:   Enumerates all printer drivers within the system
  811.  *
  812.  * Input:         context - value of R0 on entry
  813.  *
  814.  * Output:        context_out - value of R0 on exit (X version only)
  815.  *                type - value of R1 on exit
  816.  *
  817.  * Returns:       R0 (non-X version only)
  818.  *
  819.  * Other notes:   Calls SWI 0x80159.
  820.  */
  821.  
  822. extern os_error *xpdriver_enumerate_drivers (int context,
  823.       int *context_out,
  824.       pdriver_type *type);
  825. extern int pdriver_enumerate_drivers (int context,
  826.       pdriver_type *type);
  827.  
  828. /* ------------------------------------------------------------------------
  829.  * Function:      pdrivermiscop_add_font()
  830.  *
  831.  * Description:   Adds a font name to a list of those known to the current
  832.  *                printer driver
  833.  *
  834.  * Input:         font_name - value of R1 on entry
  835.  *                alien_name - value of R2 on entry
  836.  *                flags - value of R3 on entry
  837.  *                add_flags - value of R4 on entry
  838.  *
  839.  * Other notes:   Calls SWI 0x8015A with R0 = 0x0.
  840.  */
  841.  
  842. extern os_error *xpdrivermiscop_add_font (char const *font_name,
  843.       char const *alien_name,
  844.       pdriver_font_map_flags flags,
  845.       pdriver_font_add_flags add_flags);
  846. extern void pdrivermiscop_add_font (char const *font_name,
  847.       char const *alien_name,
  848.       pdriver_font_map_flags flags,
  849.       pdriver_font_add_flags add_flags);
  850.  
  851. /* ------------------------------------------------------------------------
  852.  * Function:      pdrivermiscop_remove_font()
  853.  *
  854.  * Description:   Removes font name(s) from a list of those known to the
  855.  *                current printer driver
  856.  *
  857.  * Input:         font_name - value of R1 on entry
  858.  *
  859.  * Other notes:   Calls SWI 0x8015A with R0 = 0x1.
  860.  */
  861.  
  862. extern os_error *xpdrivermiscop_remove_font (char const *font_name);
  863. extern void pdrivermiscop_remove_font (char const *font_name);
  864.  
  865. /* ------------------------------------------------------------------------
  866.  * Function:      pdrivermiscop_enumerate_fonts()
  867.  *
  868.  * Description:   Enumerates the font names known to the current printer
  869.  *                driver
  870.  *
  871.  * Input:         buffer - value of R1 on entry
  872.  *                size - value of R2 on entry
  873.  *                context - value of R3 on entry
  874.  *                flags - value of R4 on entry
  875.  *
  876.  * Output:        end - value of R1 on exit
  877.  *                context_out - value of R3 on exit (X version only)
  878.  *
  879.  * Returns:       R3 (non-X version only)
  880.  *
  881.  * Other notes:   Calls SWI 0x8015A with R0 = 0x2.
  882.  */
  883.  
  884. extern os_error *xpdrivermiscop_enumerate_fonts (char *buffer,
  885.       int size,
  886.       int context,
  887.       pdriver_enumerate_flags flags,
  888.       char **end,
  889.       int *context_out);
  890. extern int pdrivermiscop_enumerate_fonts (char *buffer,
  891.       int size,
  892.       int context,
  893.       pdriver_enumerate_flags flags,
  894.       char **end);
  895.  
  896. /* ------------------------------------------------------------------------
  897.  * Function:      pdrivermiscop_register_dumper()
  898.  *
  899.  * Description:   Registers a printer dumper with the current printer
  900.  *                driver, PDriverDP
  901.  *
  902.  * Input:         pdumper_no - value of R1 on entry
  903.  *                dp_version_required - value of R2 on entry
  904.  *                dumper_workspace - value of R3 on entry
  905.  *                dumper_code - value of R4 on entry
  906.  *                supported_calls - value of R5 on entry
  907.  *                supported_strips - value of R6 on entry
  908.  *
  909.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000000.
  910.  */
  911.  
  912. extern os_error *xpdrivermiscop_register_dumper (int pdumper_no,
  913.       int dp_version_required,
  914.       void *dumper_workspace,
  915.       void const *dumper_code,
  916.       bits supported_calls,
  917.       bits supported_strips);
  918. extern void pdrivermiscop_register_dumper (int pdumper_no,
  919.       int dp_version_required,
  920.       void *dumper_workspace,
  921.       void const *dumper_code,
  922.       bits supported_calls,
  923.       bits supported_strips);
  924.  
  925. /* ------------------------------------------------------------------------
  926.  * Function:      pdrivermiscop_deregister_dumper()
  927.  *
  928.  * Description:   Deregisters a printer dumper with the current printer
  929.  *                driver, PDriverDP
  930.  *
  931.  * Input:         pdumper_no - value of R1 on entry
  932.  *
  933.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000001.
  934.  */
  935.  
  936. extern os_error *xpdrivermiscop_deregister_dumper (int pdumper_no);
  937. extern void pdrivermiscop_deregister_dumper (int pdumper_no);
  938.  
  939. /* ------------------------------------------------------------------------
  940.  * Function:      pdrivermiscop_strip_types()
  941.  *
  942.  * Description:   Returns a bit mask showing which strip types a printer
  943.  *                dumper supports with the current printer driver - RISC O
  944.  *                S 3.5+
  945.  *
  946.  * Input:         pdumper_no - value of R1 on entry
  947.  *
  948.  * Output:        supported_strips - value of R0 on exit (X version only)
  949.  *
  950.  * Returns:       R0 (non-X version only)
  951.  *
  952.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000002.
  953.  */
  954.  
  955. extern os_error *xpdrivermiscop_strip_types (int pdumper_no,
  956.       bits *supported_strips);
  957. extern bits pdrivermiscop_strip_types (int pdumper_no);
  958.  
  959. /* ------------------------------------------------------------------------
  960.  * Function:      pdrivermiscopfordriver_add_font()
  961.  *
  962.  * Description:   Adds a font name to a list of those known to a specified
  963.  *                printer driver
  964.  *
  965.  * Input:         font_name - value of R1 on entry
  966.  *                alien_name - value of R2 on entry
  967.  *                flags - value of R3 on entry
  968.  *                add_flags - value of R4 on entry
  969.  *                type - value of R8 on entry
  970.  *
  971.  * Other notes:   Calls SWI 0x8015B with R0 = 0x0.
  972.  */
  973.  
  974. extern os_error *xpdrivermiscopfordriver_add_font (char const *font_name,
  975.       char const *alien_name,
  976.       pdriver_font_map_flags flags,
  977.       pdriver_font_add_flags add_flags,
  978.       pdriver_type type);
  979. extern void pdrivermiscopfordriver_add_font (char const *font_name,
  980.       char const *alien_name,
  981.       pdriver_font_map_flags flags,
  982.       pdriver_font_add_flags add_flags,
  983.       pdriver_type type);
  984.  
  985. /* ------------------------------------------------------------------------
  986.  * Function:      pdrivermiscopfordriver_remove_font()
  987.  *
  988.  * Description:   Removes font name(s) from a list of those known to a
  989.  *                specified printer driver
  990.  *
  991.  * Input:         font_name - value of R1 on entry
  992.  *                type - value of R8 on entry
  993.  *
  994.  * Other notes:   Calls SWI 0x8015B with R0 = 0x1.
  995.  */
  996.  
  997. extern os_error *xpdrivermiscopfordriver_remove_font (char const *font_name,
  998.       pdriver_type type);
  999. extern void pdrivermiscopfordriver_remove_font (char const *font_name,
  1000.       pdriver_type type);
  1001.  
  1002. /* ------------------------------------------------------------------------
  1003.  * Function:      pdrivermiscopfordriver_enumerate_fonts()
  1004.  *
  1005.  * Description:   Enumerates the font names known to a specified printer
  1006.  *                driver
  1007.  *
  1008.  * Input:         buffer - value of R1 on entry
  1009.  *                size - value of R2 on entry
  1010.  *                context - value of R3 on entry
  1011.  *                flags - value of R4 on entry
  1012.  *                type - value of R8 on entry
  1013.  *
  1014.  * Output:        end - value of R1 on exit
  1015.  *                context_out - value of R3 on exit (X version only)
  1016.  *
  1017.  * Returns:       R3 (non-X version only)
  1018.  *
  1019.  * Other notes:   Calls SWI 0x8015B with R0 = 0x2.
  1020.  */
  1021.  
  1022. extern os_error *xpdrivermiscopfordriver_enumerate_fonts (char *buffer,
  1023.       int size,
  1024.       int context,
  1025.       pdriver_enumerate_flags flags,
  1026.       pdriver_type type,
  1027.       char **end,
  1028.       int *context_out);
  1029. extern int pdrivermiscopfordriver_enumerate_fonts (char *buffer,
  1030.       int size,
  1031.       int context,
  1032.       pdriver_enumerate_flags flags,
  1033.       pdriver_type type,
  1034.       char **end);
  1035.  
  1036. /* ------------------------------------------------------------------------
  1037.  * Function:      pdrivermiscopfordriver_register_dumper()
  1038.  *
  1039.  * Description:   Registers a printer dumper a specified printer driver,
  1040.  *                PDriverDP
  1041.  *
  1042.  * Input:         pdumper_no - value of R1 on entry
  1043.  *                dp_version_required - value of R2 on entry
  1044.  *                dumper_workspace - value of R3 on entry
  1045.  *                dumper_code - value of R4 on entry
  1046.  *                supported_calls - value of R5 on entry
  1047.  *                supported_strips - value of R6 on entry
  1048.  *                type - value of R8 on entry
  1049.  *
  1050.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000000.
  1051.  */
  1052.  
  1053. extern os_error *xpdrivermiscopfordriver_register_dumper (int pdumper_no,
  1054.       int dp_version_required,
  1055.       void *dumper_workspace,
  1056.       void const *dumper_code,
  1057.       bits supported_calls,
  1058.       bits supported_strips,
  1059.       pdriver_type type);
  1060. extern void pdrivermiscopfordriver_register_dumper (int pdumper_no,
  1061.       int dp_version_required,
  1062.       void *dumper_workspace,
  1063.       void const *dumper_code,
  1064.       bits supported_calls,
  1065.       bits supported_strips,
  1066.       pdriver_type type);
  1067.  
  1068. /* ------------------------------------------------------------------------
  1069.  * Function:      pdrivermiscopfordriver_deregister_dumper()
  1070.  *
  1071.  * Description:   Deregisters a printer dumper with a specified printer
  1072.  *                driver, PDriverDP
  1073.  *
  1074.  * Input:         pdumper_no - value of R1 on entry
  1075.  *                type - value of R8 on entry
  1076.  *
  1077.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000001.
  1078.  */
  1079.  
  1080. extern os_error *xpdrivermiscopfordriver_deregister_dumper (int pdumper_no,
  1081.       pdriver_type type);
  1082. extern void pdrivermiscopfordriver_deregister_dumper (int pdumper_no,
  1083.       pdriver_type type);
  1084.  
  1085. /* ------------------------------------------------------------------------
  1086.  * Function:      pdrivermiscopfordriver_strip_types()
  1087.  *
  1088.  * Description:   Returns a bit mask showing which strip types a printer
  1089.  *                dumper supports with a specified printer driver - RISC O
  1090.  *                S 3.5+
  1091.  *
  1092.  * Input:         pdumper_no - value of R1 on entry
  1093.  *                type - value of R8 on entry
  1094.  *
  1095.  * Output:        supported_strips - value of R0 on exit (X version only)
  1096.  *
  1097.  * Returns:       R0 (non-X version only)
  1098.  *
  1099.  * Other notes:   Calls SWI 0x8015A with R0 = 0x80000002.
  1100.  */
  1101.  
  1102. extern os_error *xpdrivermiscopfordriver_strip_types (int pdumper_no,
  1103.       pdriver_type type,
  1104.       bits *supported_strips);
  1105. extern bits pdrivermiscopfordriver_strip_types (int pdumper_no,
  1106.       pdriver_type type);
  1107.  
  1108. /* ------------------------------------------------------------------------
  1109.  * Function:      pdriver_set_driver()
  1110.  *
  1111.  * Description:   Configures the current printer driver
  1112.  *
  1113.  * Input:         pdumper_no - value of R1 on entry
  1114.  *                ensure_command - value of R2 on entry
  1115.  *                configuration_data1 - value of R3 on entry
  1116.  *                configuration_data2 - value of R4 on entry
  1117.  *                configuration_word - value of R5 on entry
  1118.  *
  1119.  * Other notes:   Calls SWI 0x8015C.
  1120.  */
  1121.  
  1122. extern os_error *xpdriver_set_driver (int pdumper_no,
  1123.       char const *ensure_command,
  1124.       byte const *configuration_data1,
  1125.       byte const *configuration_data2,
  1126.       int configuration_word);
  1127. extern void pdriver_set_driver (int pdumper_no,
  1128.       char const *ensure_command,
  1129.       byte const *configuration_data1,
  1130.       byte const *configuration_data2,
  1131.       int configuration_word);
  1132.  
  1133. /* ------------------------------------------------------------------------
  1134.  * Function:      pdriverjpegswiinfo_dimensions()
  1135.  *
  1136.  * Description:   Returns the dimensions of a JPEG image in memory - RISC O
  1137.  *                S 3.6+
  1138.  *
  1139.  * Input:         image - value of R1 on entry
  1140.  *                size - value of R2 on entry
  1141.  *
  1142.  * Output:        info_flags - value of R0 on exit (X version only)
  1143.  *                width - value of R2 on exit
  1144.  *                height - value of R3 on exit
  1145.  *                xdpi - value of R4 on exit
  1146.  *                ydpi - value of R5 on exit
  1147.  *                workspace_size - value of R6 on exit
  1148.  *
  1149.  * Returns:       R0 (non-X version only)
  1150.  *
  1151.  * Other notes:   Calls SWI 0x8015D with R0 = 0x1, R8 = 0x49980.
  1152.  */
  1153.  
  1154. extern os_error *xpdriverjpegswiinfo_dimensions (jpeg_image const *image,
  1155.       int size,
  1156.       jpeg_info_flags *info_flags,
  1157.       int *width,
  1158.       int *height,
  1159.       int *xdpi,
  1160.       int *ydpi,
  1161.       int *workspace_size);
  1162. extern jpeg_info_flags pdriverjpegswiinfo_dimensions (jpeg_image const *image,
  1163.       int size,
  1164.       int *width,
  1165.       int *height,
  1166.       int *xdpi,
  1167.       int *ydpi,
  1168.       int *workspace_size);
  1169.  
  1170. /* ------------------------------------------------------------------------
  1171.  * Function:      pdriverjpegswifileinfo_dimensions()
  1172.  *
  1173.  * Description:   Returns the dimensions of a JPEG image in a file - RISC O
  1174.  *                S 3.6+
  1175.  *
  1176.  * Input:         file_name - value of R1 on entry
  1177.  *
  1178.  * Output:        info_flags - value of R0 on exit (X version only)
  1179.  *                width - value of R2 on exit
  1180.  *                height - value of R3 on exit
  1181.  *                xdpi - value of R4 on exit
  1182.  *                ydpi - value of R5 on exit
  1183.  *                workspace_size - value of R6 on exit
  1184.  *
  1185.  * Returns:       R0 (non-X version only)
  1186.  *
  1187.  * Other notes:   Calls SWI 0x8015D with R0 = 0x1, R8 = 0x49981.
  1188.  */
  1189.  
  1190. extern os_error *xpdriverjpegswifileinfo_dimensions (char const *file_name,
  1191.       jpeg_info_flags *info_flags,
  1192.       int *width,
  1193.       int *height,
  1194.       int *xdpi,
  1195.       int *ydpi,
  1196.       int *workspace_size);
  1197. extern jpeg_info_flags pdriverjpegswifileinfo_dimensions (char const *file_name,
  1198.       int *width,
  1199.       int *height,
  1200.       int *xdpi,
  1201.       int *ydpi,
  1202.       int *workspace_size);
  1203.  
  1204. /* ------------------------------------------------------------------------
  1205.  * Function:      pdriverjpegswi_plot_scaled()
  1206.  *
  1207.  * Description:   Plots a JPEG image from memory - RISC O S 3.6+
  1208.  *
  1209.  * Input:         image - value of R0 on entry
  1210.  *                x - value of R1 on entry
  1211.  *                y - value of R2 on entry
  1212.  *                factors - value of R3 on entry
  1213.  *                size - value of R4 on entry
  1214.  *                flags - value of R5 on entry
  1215.  *
  1216.  * Other notes:   Calls SWI 0x8015D with R8 = 0x49982.
  1217.  */
  1218.  
  1219. extern os_error *xpdriverjpegswi_plot_scaled (jpeg_image const *image,
  1220.       int x,
  1221.       int y,
  1222.       os_factors const *factors,
  1223.       int size,
  1224.       jpeg_scale_flags flags);
  1225. extern void pdriverjpegswi_plot_scaled (jpeg_image const *image,
  1226.       int x,
  1227.       int y,
  1228.       os_factors const *factors,
  1229.       int size,
  1230.       jpeg_scale_flags flags);
  1231.  
  1232. /* ------------------------------------------------------------------------
  1233.  * Function:      pdriverjpegswi_plot_file_scaled()
  1234.  *
  1235.  * Description:   Plots a JPEG image from a file - RISC O S 3.6+
  1236.  *
  1237.  * Input:         file_name - value of R0 on entry
  1238.  *                x - value of R1 on entry
  1239.  *                y - value of R2 on entry
  1240.  *                factors - value of R3 on entry
  1241.  *                flags - value of R4 on entry
  1242.  *
  1243.  * Other notes:   Calls SWI 0x8015D with R8 = 0x49983.
  1244.  */
  1245.  
  1246. extern os_error *xpdriverjpegswi_plot_file_scaled (char const *file_name,
  1247.       int x,
  1248.       int y,
  1249.       os_factors const *factors,
  1250.       jpeg_scale_flags flags);
  1251. extern void pdriverjpegswi_plot_file_scaled (char const *file_name,
  1252.       int x,
  1253.       int y,
  1254.       os_factors const *factors,
  1255.       jpeg_scale_flags flags);
  1256.  
  1257. /* ------------------------------------------------------------------------
  1258.  * Function:      pdriverjpegswi_plot_transformed()
  1259.  *
  1260.  * Description:   Plots a JPEG image from memory using a transformation
  1261.  *                matrix - RISC O S 3.6+
  1262.  *
  1263.  * Input:         image - value of R0 on entry
  1264.  *                flags - value of R1 on entry
  1265.  *                trfm_or_rect - value of R2 on entry
  1266.  *                size - value of R3 on entry
  1267.  *
  1268.  * Other notes:   Calls SWI 0x8015D with R8 = 0x49984.
  1269.  */
  1270.  
  1271. extern os_error *xpdriverjpegswi_plot_transformed (jpeg_image const *image,
  1272.       jpeg_transform_flags flags,
  1273.       os_trfm const *trfm_or_rect,
  1274.       int size);
  1275. extern void pdriverjpegswi_plot_transformed (jpeg_image const *image,
  1276.       jpeg_transform_flags flags,
  1277.       os_trfm const *trfm_or_rect,
  1278.       int size);
  1279.  
  1280. /* ------------------------------------------------------------------------
  1281.  * Function:      pdriverjpegswi_plot_file_transformed()
  1282.  *
  1283.  * Description:   Plots a JPEG image from a file using a transformation
  1284.  *                matrix - RISC O S 3.6+
  1285.  *
  1286.  * Input:         file_name - value of R0 on entry
  1287.  *                flags - value of R1 on entry
  1288.  *                trfm_or_rect - value of R2 on entry
  1289.  *
  1290.  * Other notes:   Calls SWI 0x8015D with R8 = 0x49985.
  1291.  */
  1292.  
  1293. extern os_error *xpdriverjpegswi_plot_file_transformed (char const *file_name,
  1294.       jpeg_transform_flags flags,
  1295.       os_trfm const *trfm_or_rect);
  1296. extern void pdriverjpegswi_plot_file_transformed (char const *file_name,
  1297.       jpeg_transform_flags flags,
  1298.       os_trfm const *trfm_or_rect);
  1299.  
  1300. /* ------------------------------------------------------------------------
  1301.  * Function:      service_print()
  1302.  *
  1303.  * Description:   For internal use only
  1304.  *
  1305.  * Other notes:   Calls SWI 0x30 with R1 = 0x41.
  1306.  */
  1307.  
  1308. extern os_error *xservice_print (void);
  1309. extern void service_print (void);
  1310.  
  1311. /* ------------------------------------------------------------------------
  1312.  * Function:      service_pdriver_starting()
  1313.  *
  1314.  * Description:   PDriver sharer module started
  1315.  *
  1316.  * Other notes:   Calls SWI 0x30 with R1 = 0x65.
  1317.  */
  1318.  
  1319. extern os_error *xservice_pdriver_starting (void);
  1320. extern void service_pdriver_starting (void);
  1321.  
  1322. /* ------------------------------------------------------------------------
  1323.  * Function:      service_pdriver_get_messages()
  1324.  *
  1325.  * Description:   Get common messages file
  1326.  *
  1327.  * Output:        unclaimed - value of R1 on exit (X version only)
  1328.  *                common_cb - value of R3 on exit
  1329.  *
  1330.  * Returns:       R1 (non-X version only)
  1331.  *
  1332.  * Other notes:   Calls SWI 0x30 with R1 = 0x78.
  1333.  */
  1334.  
  1335. extern os_error *xservice_pdriver_get_messages (bool *unclaimed,
  1336.       messagetrans_control_block **common_cb);
  1337. extern bool service_pdriver_get_messages (messagetrans_control_block **common_cb);
  1338.  
  1339. /* ------------------------------------------------------------------------
  1340.  * Function:      service_pdriver_changed()
  1341.  *
  1342.  * Description:   The currently selected printer driver has changed
  1343.  *
  1344.  * Other notes:   Calls SWI 0x30 with R1 = 0x7F.
  1345.  */
  1346.  
  1347. extern os_error *xservice_pdriver_changed (void);
  1348. extern void service_pdriver_changed (void);
  1349.  
  1350. #ifdef __cplusplus
  1351.    }
  1352. #endif
  1353.  
  1354. #endif
  1355.