home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / devices / prtbase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  3.0 KB  |  164 lines

  1. #ifndef DEVICES_PRTBASE_H
  2. #define DEVICES_PRTBASE_H
  3. /*
  4. ** $Filename: devices/prtbase.h $
  5. ** $Release: 2.04 Includes, V37.4 $
  6. ** $Revision: 1.10 $
  7. ** $Date: 90/11/02 $
  8. **
  9. ** printer.device base structure definitions
  10. **
  11. ** (C) Copyright 1987-1991 Commodore-Amiga, Inc.
  12. ** All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include "exec/types.h"
  17. #endif
  18. #ifndef EXEC_NODES_H
  19. #include "exec/nodes.h"
  20. #endif
  21. #ifndef EXEC_LISTS_H
  22. #include "exec/lists.h"
  23. #endif
  24. #ifndef EXEC_PORTS_H
  25. #include "exec/ports.h"
  26. #endif
  27. #ifndef EXEC_LIBRARIES_H
  28. #include "exec/libraries.h"
  29. #endif
  30. #ifndef EXEC_TASKS_H
  31. #include "exec/tasks.h"
  32. #endif
  33.  
  34. #ifndef DEVICES_PARALLEL_H
  35. #include "devices/parallel.h"
  36. #endif
  37. #ifndef DEVICES_SERIAL_H
  38. #include "devices/serial.h"
  39. #endif
  40. #ifndef DEVICES_TIMER_H
  41. #include "devices/timer.h"
  42. #endif
  43. #ifndef LIBRARIES_DOSEXTENS_H
  44. #include "libraries/dosextens.h"
  45. #endif
  46. #ifndef INTUITION_INTUITION_H
  47. #include "intuition/intuition.h"
  48. #endif
  49.  
  50.  
  51. struct DeviceData {
  52.  struct Library dd_Device; 
  53.  APTR dd_Segment; 
  54.  APTR dd_ExecBase; 
  55.  APTR dd_CmdVectors; 
  56.  APTR dd_CmdBytes; 
  57.  UWORD dd_NumCommands; 
  58. };
  59.  
  60. #define P_OLDSTKSIZE 0x0800 
  61. #define P_STKSIZE 0x1000 
  62. #define P_BUFSIZE 256 
  63. #define P_SAFESIZE 128 
  64.  
  65. struct PrinterData {
  66.  struct DeviceData pd_Device;
  67.  struct MsgPort pd_Unit; 
  68.  BPTR pd_PrinterSegment; 
  69.  UWORD pd_PrinterType; 
  70.  
  71.  struct PrinterSegment *pd_SegmentData;
  72.  UBYTE *pd_PrintBuf; 
  73.  int (*pd_PWrite)(); 
  74.  int (*pd_PBothReady)(); 
  75.  union { 
  76.  struct IOExtPar pd_p0;
  77.  struct IOExtSer pd_s0;
  78.  } pd_ior0;
  79.  
  80. #define pd_PIOR0 pd_ior0.pd_p0
  81. #define pd_SIOR0 pd_ior0.pd_s0
  82.  
  83.  union { 
  84.  struct IOExtPar pd_p1;
  85.  struct IOExtSer pd_s1;
  86.  } pd_ior1;
  87.  
  88. #define pd_PIOR1 pd_ior1.pd_p1
  89. #define pd_SIOR1 pd_ior1.pd_s1
  90.  
  91.  struct timerequest pd_TIOR; 
  92.  struct MsgPort pd_IORPort; 
  93.  struct Task pd_TC; 
  94.  UBYTE pd_OldStk[P_OLDSTKSIZE]; 
  95.  UBYTE pd_Flags; 
  96.  UBYTE pd_pad; 
  97.  struct Preferences pd_Preferences; 
  98.  UBYTE pd_PWaitEnabled; 
  99.  
  100.  UBYTE pd_Flags1; 
  101.  UBYTE pd_Stk[P_STKSIZE]; 
  102. };
  103.  
  104.  
  105. #define PPCB_GFX 0 
  106. #define PPCF_GFX 0x1 
  107. #define PPCB_COLOR 1 
  108. #define PPCF_COLOR 0x2 
  109.  
  110. #define PPC_BWALPHA 0x00 
  111. #define PPC_BWGFX 0x01 
  112. #define PPC_COLORALPHA 0x02 
  113. #define PPC_COLORGFX 0x03 
  114.  
  115.  
  116. #define PCC_BW 0x01 
  117. #define PCC_YMC 0x02 
  118. #define PCC_YMC_BW 0x03 
  119. #define PCC_YMCB 0x04 
  120. #define PCC_4COLOR 0x04 
  121. #define PCC_ADDITIVE 0x08 
  122. #define PCC_WB 0x09 
  123. #define PCC_BGR 0x0A 
  124. #define PCC_BGR_WB 0x0B 
  125. #define PCC_BGRW 0x0C 
  126.  
  127. #define PCC_MULTI_PASS 0x10 
  128.  
  129. struct PrinterExtendedData {
  130.  char *ped_PrinterName; 
  131.  VOID (*ped_Init)(); 
  132.  VOID (*ped_Expunge)(); 
  133.  int (*ped_Open)(); 
  134.  VOID (*ped_Close)(); 
  135.  UBYTE ped_PrinterClass; 
  136.  UBYTE ped_ColorClass; 
  137.  UBYTE ped_MaxColumns; 
  138.  UBYTE ped_NumCharSets; 
  139.  UWORD ped_NumRows; 
  140.  ULONG ped_MaxXDots; 
  141.  ULONG ped_MaxYDots; 
  142.  UWORD ped_XDotsInch; 
  143.  UWORD ped_YDotsInch; 
  144.  char ***ped_Commands; 
  145.  int (*ped_DoSpecial)(); 
  146.  int (*ped_Render)(); 
  147.  LONG ped_TimeoutSecs; 
  148.  
  149.  char **ped_8BitChars; 
  150.  LONG ped_PrintMode; 
  151.  
  152.  
  153.  int (*ped_ConvFunc)();
  154. };
  155.  
  156. struct PrinterSegment {
  157.  ULONG ps_NextSegment; 
  158.  ULONG ps_runAlert; 
  159.  UWORD ps_Version; 
  160.  UWORD ps_Revision; 
  161.  struct PrinterExtendedData ps_PED; 
  162. };
  163. #endif
  164.