#ifndef DEVICES_PRTBASE_H #define DEVICES_PRTBASE_H /* ** $VER: prtbase.h 44.1 (19.10.1999) ** Includes Release 45.1 ** ** printer driver structure definitions ** ** (C) Copyright 1987-2001 Amiga, Inc. ** All Rights Reserved */ #ifndef UTILITY_TAGITEM_H #include #endif #ifndef EXEC_DEVICES_H #include #endif #ifndef DEVICES_PARALLEL_H #include #endif #ifndef DEVICES_SERIAL_H #include #endif #ifndef DEVICES_TIMER_H #include #endif #ifndef DOS_DOSEXTENS_H #include #endif #ifndef INTUITION_INTUITION_H #include #endif /****************************************************************************/ 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 */ }; /****************************************************************************/ /* IO Flags */ #define IOB_QUEUED 4 #define IOB_CURRENT 5 #define IOB_SERVICING 6 #define IOB_DONE 7 #define IOF_QUEUED (1L<= 33: * *************************************************************/ /* Conversion strings for the extended font */ STRPTR * ped_8BitChars; /* Set if text printed, otherwise 0 */ LONG ped_PrintMode; /************************************************************** * * The following only exists if the segment version is >= 34: * *************************************************************/ /* ptr to conversion function for all chars: * * LONG ped_ConvFunc(UBYTE * buf, * UBYTE c, * LONG crlf_flag); */ LONG (*ped_ConvFunc)(); /************************************************************** * * 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; /* driver specific preferences: * * LONG ped_DoPreferences(struct printerIO * ior, * LONG command); */ LONG (*ped_DoPreferences)(); /* custom error handling: * * VOID ped_CallErrHook(struct printerIO * ior, * struct Hook * hook); */ VOID (*ped_CallErrHook)(); }; /****************************************************************************/ /* The following tags are used to define more printer driver features */ #define PRTA_Dummy (TAG_USER + 0x50000) /****************************************************************************/ /* V44 features */ #define PRTA_8BitGuns (PRTA_Dummy + 1) /* LBOOL */ #define PRTA_ConvertSource (PRTA_Dummy + 2) /* LBOOL */ #define PRTA_FloydDithering (PRTA_Dummy + 3) /* LBOOL */ #define PRTA_AntiAlias (PRTA_Dummy + 4) /* LBOOL */ #define PRTA_ColorCorrection (PRTA_Dummy + 5) /* LBOOL */ #define PRTA_NoIO (PRTA_Dummy + 6) /* LBOOL */ #define PRTA_NewColor (PRTA_Dummy + 7) /* LBOOL */ #define PRTA_ColorSize (PRTA_Dummy + 8) /* LONG */ #define PRTA_NoScaling (PRTA_Dummy + 9) /* LBOOL */ /* User interface */ #define PRTA_DitherNames (PRTA_Dummy + 20) /* STRPTR * */ #define PRTA_ShadingNames (PRTA_Dummy + 21) /* STRPTR * */ #define PRTA_ColorCorrect (PRTA_Dummy + 22) /* LBOOL */ #define PRTA_DensityInfo (PRTA_Dummy + 23) /* STRPTR * */ /* Hardware page borders */ #define PRTA_LeftBorder (PRTA_Dummy + 30) /* LONG, inches/1000 */ #define PRTA_TopBorder (PRTA_Dummy + 31) /* LONG, inches/1000 */ #define PRTA_MixBWColor (PRTA_Dummy + 32) /* LBOOL */ /* Driver Preferences */ #define PRTA_Preferences (PRTA_Dummy + 40) /* LBOOL */ /****************************************************************************/ struct PrinterSegment { BPTR ps_NextSegment; ULONG ps_runAlert; /* MOVEQ #0,D0 : RTS */ UWORD ps_Version; /* segment version */ UWORD ps_Revision; /* segment revision */ struct PrinterExtendedData ps_PED; /* printer extended data */ }; /****************************************************************************/ /* Driver specific preferences. This structure is device specific: every driver must base its preferences structure on this to allow version checking etc. The application will read/write this structure as an I/O buffer. */ struct PrtDriverPreferences { UWORD pdp_Version; /* PRIVATE! driver specific version */ UBYTE pdp_PrinterID[32]; /* PRIVATE! driver specific id */ char pdp_PrefName[FILENAME_SIZE-16]; ULONG pdp_Length; /* size of this structure */ /* .. more driver private fields follow .. */ }; #endif /* DEVICES_PRTBASE_H */