8
#define PRINTERQUEUE_CUSTOMCOMMAND "<Use custom print command>"
9
#define PRINTERQUEUE_SAVETOFILE "<Save to file>"
12
15
void (*Dispose)(struct pqinfo *pq);
14
/* For querying the available printer queues */
17
/***** For querying the available printer queues *****/
16
19
int (*GetPrinterCount)(struct pqinfo *pq);
17
20
char *(*GetPrinterName)(struct pqinfo *pq,int index);
19
/* Select a printer queue with this function */
22
/* Get and set the current printer queue... */
23
const char *(*GetPrinterQueue)(struct pqinfo *pq);
21
24
void (*SetPrinterQueue)(struct pqinfo *pq,const char *queue);
23
26
/* Returns the gutenprint driver associated with
31
34
char *(*GetPPD)(struct pqinfo *pq);
33
/* Functions to delineate the beginning and end of pages and jobs. */
37
/***** Output Options *****/
40
/* Custom command (Unix only)
41
If a custom command is set, then instead of piping data to the
42
queue's default command, it will be piped to the custom command. */
44
const char *(*GetCustomCommand)(struct pqinfo *pq);
45
void (*SetCustomCommand)(struct pqinfo *pq,const char *cmd);
48
/* Saving to a file (Unix and Windows)
49
Redirects the print data to a file.
50
Uses a callback function to get the output filename at print-time.
53
Define a function that returns a filename - must return a full path,
54
which will be free()d once the file is open:
56
char *mygetfnfunc(void *userdata)
58
struct myuserdata *ud=(struct myuserdata *ud)userdata;
59
[do user interface stuff here]
63
pqinfo->SetGetFilenameCallback(pqinfo,mygetfnfunc,userdata);
67
void (*SetGetFilenameCallback)(struct pqinfo *pq,char *(*getfilename)(void *userdata),void *userdata);
69
/***** Job Handling *****/
34
71
int (*InitialiseJob)(struct pqinfo *pq);
35
72
void (*InitialisePage)(struct pqinfo *pq);
36
73
void (*EndPage)(struct pqinfo *pq);