PRINTER Types Reference¶
Per-function autodoc pages link to these types via the type name (e.g., [List](types-printer.md#list)).
Clickable inner types: inside each struct definition, field types that are themselves structs/unions/enums are clickable hyperlinks to their own definitions.
Contents¶
printer.h¶
struct DRPSourceMsgstruct IODRPReqstruct IODRPTagsReqstruct IOPrefsReqstruct IOPrtCmdReqstruct IOPrtErrReqstruct IOPrtPrefsReqstruct PrtErrMsg
prtbase.h¶
DRPSourceMsg¶
Source: devices/printer.h
Since: 3.2+
struct DRPSourceMsg {
LONG x;
LONG y;
LONG width;
LONG height;
ULONG *buf; /* fill this buffer with 0x00RRGGBB pixels */
};
IODRPReq¶
Source: devices/printer.h
Since: 1.3+
struct IODRPReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
struct RastPort *io_RastPort; /* raster port */
struct ColorMap *io_ColorMap; /* color map */
ULONG io_Modes; /* graphics viewport modes */
UWORD io_SrcX; /* source x origin */
UWORD io_SrcY; /* source y origin */
UWORD io_SrcWidth; /* source x width */
UWORD io_SrcHeight; /* source x height */
LONG io_DestCols; /* destination x width */
LONG io_DestRows; /* destination y height */
UWORD io_Special; /* option flags */
};
IODRPTagsReq¶
Source: devices/printer.h
Since: 3.2+
struct IODRPTagsReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
struct RastPort *io_RastPort; /* raster port */
struct ColorMap *io_ColorMap; /* color map */
ULONG io_Modes; /* graphics viewport modes */
UWORD io_SrcX; /* source x origin */
UWORD io_SrcY; /* source y origin */
UWORD io_SrcWidth; /* source x width */
UWORD io_SrcHeight; /* source x height */
LONG io_DestCols; /* destination x width */
LONG io_DestRows; /* destination y height */
UWORD io_Special; /* option flags */
struct TagItem *io_TagList; /* tag list with additional info */
};
IOPrefsReq¶
Source: devices/printer.h
Since: 3.2+
struct IOPrefsReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
struct PrinterTxtPrefs *io_TxtPrefs;
struct PrinterUnitPrefs *io_UnitPrefs;
struct PrinterDeviceUnitPrefs *io_DevUnitPrefs;
struct PrinterGfxPrefs *io_GfxPrefs;
};
IOPrtCmdReq¶
Source: devices/printer.h
Since: 1.3+
struct IOPrtCmdReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
UWORD io_PrtCommand; /* printer command */
UBYTE io_Parm0; /* first command parameter */
UBYTE io_Parm1; /* second command parameter */
UBYTE io_Parm2; /* third command parameter */
UBYTE io_Parm3; /* fourth command parameter */
};
IOPrtErrReq¶
Source: devices/printer.h
Since: 3.2+
struct IOPrtErrReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
struct Hook *io_Hook;
};
IOPrtPrefsReq¶
Source: devices/printer.h
Since: 3.2+
struct IOPrtPrefsReq {
struct Message io_Message;
struct Device *io_Device; /* device node pointer */
struct Unit *io_Unit; /* unit (driver private)*/
UWORD io_Command; /* device command */
UBYTE io_Flags;
BYTE io_Error; /* error or warning num */
struct TagItem *io_TagList; /* requester tag list */
};
PrtErrMsg¶
Source: devices/printer.h
Since: 3.2+
struct PrtErrMsg {
ULONG pe_Version; /* Version of this struct */
ULONG pe_ErrorLevel; /* RETURN_WARN, RETURN_ERROR, RETURN_FAIL */
struct Window *pe_Window; /* window for EasyRequest() */
struct EasyStruct *pe_ES;
ULONG *pe_IDCMP;
APTR pe_ArgList;
};
DeviceData¶
Source: devices/prtbase.h
Since: 1.3+
struct DeviceData {
struct Library dd_Device; /* standard library node */
APTR dd_Segment; /* A0 when initialized */
APTR dd_ExecBase; /* A6 for exec */
APTR dd_CmdVectors; /* command table for device commands */
APTR dd_CmdBytes; /* bytes describing which command queue */
UWORD dd_NumCommands; /* the number of commands supported */
};
PrinterData¶
Source: devices/prtbase.h
Since: 1.3+
struct PrinterData {
struct DeviceData pd_Device;
/* PRIVATE & OBSOLETE: the one and only unit */
struct MsgPort pd_Unit; /* the one and only unit */
BPTR pd_PrinterSegment; /* the printer specific segment */
UWORD pd_PrinterType; /* the segment printer type */
/* the segment data structure */
struct PrinterSegment *pd_SegmentData;
UBYTE *pd_PrintBuf; /* the raster print buffer */
LONG (* PRT_STDARGS pd_PWrite)(APTR buffer,LONG length); /* the write function */
LONG (* PRT_STDARGS pd_PBothReady)(void); /* write function's done */
union { /* port I/O request 0 */
struct IOExtPar pd_p0;
struct IOExtSer pd_s0;
} pd_ior0;
#define pd_PIOR0 pd_ior0.pd_p0
#define pd_SIOR0 pd_ior0.pd_s0
union { /* and 1 for double buffering */
struct IOExtPar pd_p1;
struct IOExtSer pd_s1;
} pd_ior1;
#define pd_PIOR1 pd_ior1.pd_p1
#define pd_SIOR1 pd_ior1.pd_s1
struct timerequest pd_TIOR; /* timer I/O request */
struct MsgPort pd_IORPort; /* and message reply port */
struct Task pd_TC; /* write task */
/* PRIVATE: and stack space (OBSOLETE) */
UBYTE pd_OldStk[P_OLDSTKSIZE]; /* and stack space (OBSOLETE) */ [2.0+]
UBYTE pd_Flags; /* device flags */
UBYTE pd_pad; /* padding */
struct Preferences pd_Preferences; /* the latest preferences */
UBYTE pd_PWaitEnabled; /* wait function switch */
/* new fields for V2.0 */
UBYTE pd_Flags1; /* padding */ [2.0+]
UBYTE pd_Stk[P_STKSIZE]; /* stack space */
/**************************************************************
*
* New fields for V3.5 (V44):
*
*************************************************************/
/* PRIVATE: the Unit. pd_Unit is obsolete */
struct PrinterUnit * pd_PUnit; [3.2+]
/* the read function:
*
* LONG pd_PRead(APTR buffer,
* LONG * length,
* TimeVal_Type * tv);
*/
LONG (* PRT_STDARGS pd_PRead)(APTR buffer, LONG *length, TimeVal_Type *tv);
/* call application's error hook:
*
* LONG pd_CallErrorHook(struct Hook * hook,
* union printerIO * ior,
* struct PrtErrMsg * pem);
*/
LONG (* PRT_STDARGS pd_CallErrHook)(struct Hook * hook,
union printerIO * ior,
struct PrtErrMsg * pem);
/* unit number */
ULONG pd_UnitNumber; [3.2+]
/* name of loaded driver */
STRPTR pd_DriverName; [3.2+]
/* the query function:
*
* LONG pd_PQuery(LONG * numofchars);
*/
LONG (* PRT_STDARGS pd_PQuery)(LONG * numofchars);
};
PrinterExtendedData¶
Source: devices/prtbase.h
Since: 1.3+
struct PrinterExtendedData {
STRPTR ped_PrinterName; /* printer name, null terminated */
VOID (* PRT_STDARGS ped_Init)(struct PrinterData * pd); /* called after LoadSeg */
VOID (* PRT_STDARGS ped_Expunge)(void); /* called before UnLoadSeg */
int (* PRT_STDARGS ped_Open)(struct IORequest *ior); /* called at OpenDevice */
VOID (* PRT_STDARGS ped_Close)(struct IORequest *ior); /* called at CloseDevice */
UBYTE ped_PrinterClass; /* printer class */
UBYTE ped_ColorClass; /* color class */
UBYTE ped_MaxColumns; /* number of print columns available */
UBYTE ped_NumCharSets; /* number of character sets */
UWORD ped_NumRows; /* number of 'pins' in print head */
ULONG ped_MaxXDots; /* number of dots max in a raster dump */
ULONG ped_MaxYDots; /* number of dots max in a raster dump */
UWORD ped_XDotsInch; /* horizontal dot density */
UWORD ped_YDotsInch; /* vertical dot density */
STRPTR **ped_Commands; /* printer text command table */
LONG (* PRT_STDARGS ped_DoSpecial)(UWORD * command, UBYTE output_buffer[],
BYTE * current_line_position, BYTE * current_line_spacing,
BYTE * crlf_flag, STRPTR params); /* special command handler */
LONG (* PRT_STDARGS ped_Render)(LONG ct, LONG x, LONG y, LONG status,...); /* raster render function */
LONG ped_TimeoutSecs; /* good write timeout */
/* the following only exists if the segment version is >= 33 */
STRPTR *ped_8BitChars; /* conv. strings for the extended font */
LONG ped_PrintMode; /* set if text printed, otherwise 0 */
/* the following only exists if the segment version is >= 34 */
/* ptr to conversion function for all chars */
LONG (* PRT_STDARGS ped_ConvFunc)(STRPTR buf, TEXT c, LONG crlf_flag);
/**************************************************************
*
* The following only exists if the segment version is >= 44
* AND PPCB_EXTENDED is set in ped_PrinterClass:
*
*************************************************************/
/* Attributes and features */
struct TagItem * ped_TagList; [3.2+]
/* driver specific preferences:
*
* LONG ped_DoPreferences(union printerIO * ior,
* LONG command);
*/
LONG (* PRT_STDARGS ped_DoPreferences)(union printerIO * ior,LONG command);
/* custom error handling:
*
* VOID ped_CallErrHook(union printerIO * ior,
* struct Hook * hook);
*/
VOID (* PRT_STDARGS ped_CallErrHook)(union printerIO * ior,struct Hook * hook);
};
PrinterSegment¶
Source: devices/prtbase.h
Since: 1.3+
struct PrinterSegment {
ULONG ps_NextSegment; /* (actually a BPTR) */
ULONG ps_runAlert; /* MOVEQ #0,D0 : RTS */
UWORD ps_Version; /* segment version */
UWORD ps_Revision; /* segment revision */
struct PrinterExtendedData ps_PED; /* printer extended data */
};