1 /************************************************************************/
2 /* © Acorn Computers Ltd, 1992. */
4 /* This file forms part of an unsupported source release of RISC_OSLib. */
6 /* It may be freely used to create executable images for saleable */
7 /* products but cannot be sold in source form or as an object library */
8 /* without the prior written consent of Acorn Computers Ltd. */
10 /* If this file is re-distributed (even if modified) it should retain */
11 /* this copyright notice. */
13 /************************************************************************/
17 * Purpose: provide printer driver access
18 * History: IDJ: 06-Feb-92: prepared for source release
28 /* Printer Driver SWI's */
30 #define Info 0x00080140
31 #define SetInfo 0x00080141
32 #define CheckFeatures 0x00080142
33 #define PageSize 0x00080143
34 #define SetPageSize 0x00080144
35 #define SelectJob 0x00080145
36 #define CurrentJob 0x00080146
37 /* FontSWI goes in here - only the font manager may use this */
38 #define EndJob 0x00080148
39 #define AbortJob 0x00080149
40 #define Reset 0x0008014A
41 #define GiveRectangle 0x0008014B
42 #define DrawPage 0x0008014C
43 #define GetRectangle 0x0008014D
44 #define CancelJob 0x0008014E
45 #define ScreenDump 0x0008014F
46 #define SelectIllus 0x00080153
48 #pragma no_check_stack
51 os_error * print_info(print_infostr *i)
56 e = os_swix(Info, &r);
58 i->version = r.r[0] & 0xFFFF;
59 i->identity = r.r[0] >> 16;
63 i->description = (char*)r.r[4];
72 os_error * print_setinfo(print_infostr *i)
83 return(os_swix(SetInfo, &r));
87 os_error * print_checkfeatures(int mask,int value)
94 return(os_swix(CheckFeatures, &r));
98 os_error * print_pagesize(print_pagesizestr *p)
103 e = os_swix(PageSize, &r);
116 os_error * print_setpagesize(print_pagesizestr *p)
127 return(os_swix(SetPageSize, &r));
131 os_error * print_selectjob(int job,char *title, int *oldjobp)
139 e = os_swix(SelectJob,&r);
147 os_error * print_currentjob(int *curjobp)
152 e = os_swix(CurrentJob,&r);
160 os_error * print_endjob(int job)
165 return os_swix(EndJob,&r);
169 os_error * print_abortjob(int job)
174 return os_swix(AbortJob,&r);
178 os_error * print_canceljob(int job)
183 return os_swix(CancelJob,&r);
187 os_error * print_reset(void)
190 return os_swix(Reset,&r);
194 os_error *print_giverectangle(int ident, print_box *area,
195 print_transmatstr *trans,
196 print_positionstr *posn, int bgcol)
206 return os_swix(GiveRectangle,&r);
210 os_error * print_drawpage(int copies,int sequ,char *page,
211 print_box *clip,int *more, int *ident)
216 r.r[0] = copies; /* number of copies */
217 r.r[1] = (int)clip; /* where to return clip rectangle */
218 r.r[2] = sequ; /* pages sequence number within document */
219 r.r[3] = (int)page; /* 'real' page number as a string */
221 e = os_swix(DrawPage, &r);
223 *more = r.r[0]; /* number of copies left to do */
224 *ident = r.r[2]; /* rectangle identification word */
230 os_error * print_getrectangle(print_box *clip, int *more, int *ident)
235 r.r[1] = (int)clip; /* where to return clip rectangle */
237 e = os_swix(GetRectangle, &r);
239 *more = r.r[0]; /* number of copies left to do */
240 *ident = r.r[2]; /* rectangle identification word */
246 os_error * print_screendump(int job)
251 return os_swix(ScreenDump,&r);
255 os_error * print_selectillustration(int job, char *title, int *oldjobp)
262 e = os_swix(SelectIllus, &r);