Wed, 05 Aug 2009 16:03:03 +0100
Tweaks to comments to make Doxygen happier...
src/main.c | file | annotate | diff | revisions | |
src/ptouch.h | file | annotate | diff | revisions |
1.1 diff -r e5577dd259c6 -r 57eff547e4f1 src/main.c 1.2 --- a/src/main.c Wed Aug 05 15:15:47 2009 +0100 1.3 +++ b/src/main.c Wed Aug 05 16:03:03 2009 +0100 1.4 @@ -75,6 +75,10 @@ 1.5 gdImagePng(im, fp); 1.6 fclose(fp); 1.7 1.8 + // Set job options 1.9 + pt_SetOption(dev, PT_OPTION_AUTOCUT, 1); 1.10 + pt_SetOption(dev, PT_OPTION_MIRROR, 1); 1.11 + 1.12 // Print the label 1.13 printf("Print state code: %d\n", pt_Print(dev, &im, 1)); 1.14
2.1 diff -r e5577dd259c6 -r 57eff547e4f1 src/ptouch.h 2.2 --- a/src/ptouch.h Wed Aug 05 15:15:47 2009 +0100 2.3 +++ b/src/ptouch.h Wed Aug 05 16:03:03 2009 +0100 2.4 @@ -18,19 +18,31 @@ 2.5 * 2.6 * This is used to store the state of the printer as of the last call to 2.7 * pt_GetStatus(), the current job settings, and other details required 2.8 - * by the printer driver. 2.9 + * by the printer driver. User code should not change any parameters inside 2.10 + * a pt_Device struct under any circumstances. For further information on 2.11 + * the various fields, see the Brother PT-9500PC Command Reference. 2.12 */ 2.13 typedef struct { 2.14 /// Reference to the printer device 2.15 FILE *fp; 2.16 /// Error information 2.17 int errorInfo[2]; 2.18 - /// Label width, type and length 2.19 - int mediaWidth, mediaType, mediaLength; 2.20 + /// Label width (in millimetres) 2.21 + int mediaWidth; 2.22 + /// Label type 2.23 + int mediaType; 2.24 + /// Label length (in millimetres) 2.25 + int mediaLength; 2.26 /// Label width in pixels 2.27 int pixelWidth; 2.28 - /// Status type, phase type, and phase number 2.29 - int statusType, phaseType, phaseHi, phaseLo; 2.30 + /// Printer status type 2.31 + int statusType; 2.32 + /// Printing phase type 2.33 + int phaseType; 2.34 + /// Printing phase, high byte 2.35 + int phaseHi; 2.36 + /// Printing phase, low byte 2.37 + int phaseLo; 2.38 /// Notification number 2.39 int notification; 2.40 2.41 @@ -38,9 +50,8 @@ 2.42 int autocut; 2.43 /// Print parameter: mirror printing enable 2.44 int mirror; 2.45 - /// Print parameter: half-cut enable 2.46 - /// Print parameter: chainprint enable 2.47 - /// Print parameter: label end cut 2.48 + // TODO: add support for half-cut (when I get a printer that supports it) 2.49 + // TODO: add support for printing a separator line when autocut is off 2.50 } pt_Device; 2.51 2.52 /* 2.53 @@ -70,7 +81,7 @@ 2.54 * Job options 2.55 */ 2.56 typedef enum { 2.57 -/// Mirror -- mirror the printed label along the long edge 2.58 +/// Mirror -- mirror the printed label vertically 2.59 PT_OPTION_MIRROR, 2.60 /// Auto-cutter -- enable or disable automatic label cutting 2.61 PT_OPTION_AUTOCUT