Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

271 lines
10 KiB

  1. //----------------------------------------------------------------------------
  2. // Filename: kpdlms.h
  3. // This file contains definitions for KPDL mini-driver
  4. //-----------------------------------------------------------------------------
  5. // kpdlms mini driver device data structure
  6. typedef struct
  7. {
  8. GLOBALHANDLE hKeep;
  9. char szDevName[CCHDEVICENAME];
  10. WORD wRes; // resolution 600 or 400 or 240
  11. WORD wCopies; // number of multi copies
  12. short sSBCSX;
  13. short sDBCSX;
  14. short sSBCSXMove; // use to set address mode
  15. short sSBCSYMove; // use to set address mode
  16. short sDBCSXMove; // use to set address mode
  17. short sDBCSYMove; // use to set address mode
  18. short sEscapement; // use to set address mode
  19. // WORD wPenStyle; //
  20. // WORD wPenWidth; //
  21. WORD wPenColor; //
  22. WORD fBrCreated; //
  23. WORD wBrStyle; //
  24. BOOL fVertFont; // for TATEGAKI font
  25. BOOL fFax; // for 1000FX
  26. DWORD dwMulti; // for Pattern
  27. BOOL fFill; // flag of fill command
  28. BOOL fStroke; // flag of stroke command
  29. // BOOL fTrans; //
  30. BOOL fCurve; // flag for Curves
  31. HANDLE hBuff;
  32. LPSTR lpBuff;
  33. LPSTR lpLBuff;
  34. #ifdef WINNT
  35. WORD wBitmapX;
  36. WORD wBitmapY;
  37. WORD wCurrentAddMode;
  38. WORD wOldFontID;
  39. #else // WINNT
  40. WORD wBitmapY;
  41. WORD wBitmapYC;
  42. #endif // WINNT
  43. WORD wBitmapLen;
  44. BOOL fComp;
  45. BOOL fPlus;
  46. WORD wScale;
  47. LONG lPointsx;
  48. LONG lPointsy;
  49. BOOL fMono;
  50. int CursorX;
  51. int CursorY;
  52. int Kaicho;
  53. int Color;
  54. } NPDL2MDV, FAR *LPNPDL2MDV;
  55. // NPDL2 command
  56. #define ESC_RESET "\033c1", 3 // software reset
  57. #define ESC_KANJIYOKO "\033K", 2 // kanji yoko mode
  58. #define ESC_KANJITATE "\033t", 2 // kanji yoko mode
  59. #define FS_PAGEMODE "\034d240.", 6 // page mode
  60. #define FS_DRAWMODE "\034\"R.", 4 // draw mode
  61. #define FS_ADDRMODE_ON "\034a%d,%d,0,B." // set address mode
  62. #define FS_GRPMODE_ON "\034Y", 2 // set graphic mode
  63. #define FS_GRPMODE_OFF "\034Z", 2 // reset graphic mode
  64. #define FS_SETMENUNIT "\034<1/%d,i." // select men-mode resolution
  65. #define FS_JIS78 "\03405F2-00", 8 // select JIS78
  66. #define FS_JIS90 "\03405F2-02", 8 // select JIS90
  67. #define FS_ENDPAGE "\034R\034x%d.\015\014" // end page
  68. #define FS_E "\034e%d,%d."
  69. #define FS_RESO "\034&%d."
  70. #define FS_RESO0_RESET "\034&0.\033c1", 7
  71. #define VEC_INIT_600 "PD;IP0,0,608,608;", 17
  72. #define VEC_INIT_400 "PD;IP0,0,405,405;", 17
  73. #define VEC_INIT_240 "PD;IP0,0,243,243;", 17
  74. #define VEC_TRANS "PM0,0;", 6
  75. #define VEC_OPAQUE "PM1,1;", 6
  76. #define VEC_OPLINE "PM,1;", 5
  77. #define INIT_DOC "\034<1/%d,i.\034YSU1,%d,0;\034Z"
  78. #define RESO_PAGE_KANJI "\034&%d.\034d240.\033K"
  79. #define FS_I "\034R\034i%d,%d,0,1/1,1/1,%d,%d."
  80. #define FS_I_2 "\034R\034i%d,%d,5,1/1,1/1,%d,%d."
  81. #define FS_I_D "%d,%d."
  82. #define FS_M_Y "\034m1/1,%s."
  83. #define FS_M_T "\034m%s,1/1."
  84. #define FS_12S2 "\03412S2-%04ld-%04ld"
  85. #define FX_MODESET "\03402ZS", 5
  86. #define FX_DATAEND "\03402ZE", 5
  87. #define FX_SETSTART "\03402ZM", 5
  88. #define FX_SETEND "\03402ZN", 5
  89. #define FX_TEL "TN%s\015"
  90. #define FX_QUA "GQ%d\015"
  91. #define FX_MY "SN%s\015"
  92. #define FX_ID "ID%s\015"
  93. #define FX_INIT "\03402ZS\03402ZM", 10
  94. // add 11/28 for PC-PR2000/6W (Naka)
  95. #define FS_PCMODE "\03406MNPDL1", 9 // return to PC mode
  96. // add 95/5/8 for NPDL2+ Vector command (Nakamura)
  97. #define VEC_ELLIP "MA%d,%d;CV%d,%d,%d,%d,%d,%d,%d,0;" // draw ellipse
  98. #define VEC_E_PIE "MA%d,%d;FV%d,%d,%d,%d,%d,%d,%d,0;" // draw pie
  99. #define VEC_E_ARC "MA%d,%d;AV%d,%d,%d,%d,%d,%d,0;" // draw arc
  100. #define VEC_RECT "NP;MA%d,%d;PR%d,0,0,%d,-%d,0,0,-%d;EP;"
  101. #define VEC_RECT_P "MA%d,%d;RB%d,%d,0,0,%d;"
  102. #define VEC_CENTER "MA%d,%d;" // move pen center
  103. #define PATH_BIGIN "NP;", 3 // begin path mode
  104. #define VEC_STROKE "ST1;", 4 // stroke
  105. #define VEC_STROKE_OPA_W "LT;ST1;LT%d,10;"
  106. #define VEC_WINDFILL "FL1;", 4 //
  107. #define VEC_ALTFILL "EF1;", 4 //
  108. #define VEC_LC "LC%d;" // endcap
  109. #define VEC_LJ "LJ%d;" // join
  110. #define VEC_SU "SU1,%d,0;" // select graphic resolution
  111. #define VEC_SG "SG%d,%d;" // set gray
  112. #define VEC_SG_PEN "SG,%d;" // set Pen gray
  113. #define VEC_SG_PEN_B "SG,0;", 5 // set Pen gray
  114. #define VEC_SG_PEN_W "SG,100;", 7 // set Pen gray
  115. #define VEC_SG_BR "SG%d;" // set Brush gray
  116. #define VEC_PP "PP%d;" // select Brush
  117. #define VEC_PEN_WIDTH "LW%d;"
  118. #define VEC_PEN_WIDTH_1 "LW1;", 4
  119. #define VEC_LT_SOLID "LT;", 3
  120. #define VEC_LT_STYLE "LT%d,10;"
  121. #define VEC_LT_STYLE_B "LT%d,10;SG,0;"
  122. #define VEC_LT_WHITE "LT;SG,100;", 10
  123. // add 11/28 for PC-PR2000/6W (Naka)
  124. #define VEC_PP6 "PP%d,2,2;" // selest Brush for 600dpi
  125. #define VEC_PP2 "PP%d,2,2;" // selest Brush for 2x2
  126. #define VEC_PP3 "PP%d,3,3;" // selest Brush for 3x3
  127. #define VEC_RP_BYTE "%02X" // Brush Pattern Set
  128. #define VEC_RP_HORIZONTAL "RP100,8,8,00,00,00,00,FF,00,00,00;", 34// create PP_HORIZONTAL
  129. #define VEC_RP_VERTICAL "RP101,8,8,08,08,08,08,08,08,08,08;", 34// create PP_VERTICAL
  130. #define VEC_RP_FDIAGONAL "RP102,8,8,80,40,20,10,08,04,02,01;", 34// create PP_FDIAGONAL
  131. #define VEC_RP_BDIAGONAL "RP103,8,8,01,02,04,08,10,20,40,80;", 34// create PP_BDIAGONAL
  132. #define VEC_RP_CROSS "RP104,8,8,08,08,08,08,FF,08,08,08;", 34// create PP_CROSS
  133. #define VEC_RP_DIAGCROSS "RP105,8,8,81,42,24,18,18,24,42,81;", 34// creata PP_DIAGCROSS
  134. #define VEC_BEGIN "MA%d,%d;PR"
  135. #define VEC_CONTINUE "%d,%d"
  136. #define VEC_BEGIN_BEZ "MA%d,%d;BA"
  137. #define VEC_CONTINUE_BEZ "%d,%d,%d,%d,%d,%d"
  138. #define VEC_CLIP "IW%d,%d,%d,%d;"
  139. //#define VEC_ENDPOLY ";CP;", 4
  140. #define VEC_ENDPOLY ";", 1
  141. #define VEC_ENDPOLY_D "0,0,1,1;", 8
  142. // Pen and Brush Color
  143. #define SG_WHITE 100
  144. #define SG_BLACK 0
  145. // Created Hatch Style Brush
  146. #define RP_HORIZONTAL 0x0001
  147. #define RP_VERTICAL 0x0002
  148. #define RP_FDIAGONAL 0x0004
  149. #define RP_BDIAGONAL 0x0008
  150. #define RP_CROSS 0x0010
  151. #define RP_DIAGCROSS 0x0020
  152. // Select Brush Style
  153. #define PP_NULL 0
  154. #define PP_SOLID 1
  155. #define PP_HATCH 100
  156. #define PP_HORIZONTAL 100
  157. #define PP_VERTICAL 101
  158. #define PP_FDIAGONAL 102
  159. #define PP_BDIAGONAL 103
  160. #define PP_CROSS 104
  161. #define PP_DIAGCROSS 105
  162. #define PP_USERPATERN 105
  163. // Command CallBack ID
  164. #define CALLBACK_ID_MAX 255 //
  165. // PAGECONTROL
  166. #define PC_MULT_COPIES_N 1
  167. #define PC_MULT_COPIES_C 2
  168. #define PC_TYPE_F 4
  169. #define PC_END_F 6
  170. #define PC_ENDPAGE 7
  171. #define PC_PRN_DIRECTION 9
  172. #define PC_TYPE_6 10 // add 11/25 for PC-PR2000/6W (Naka)
  173. // FONTSIMULATION
  174. #define FS_SINGLE_BYTE 20
  175. #define FS_DOUBLE_BYTE 21
  176. // RESOLUTION
  177. #define RES_240 30
  178. #define RES_400 31
  179. #define RES_600 32 // add 11/25 for PC-PR2000/6W (Naka)
  180. #define RES_BLOCKOUT1 33
  181. #define RES_BLOCKOUT2 34
  182. #define RES_300 35
  183. #define RES_SENDBLOCK 36
  184. // CAROUSEL
  185. #define CAR_SELECT_PEN_COLOR 40
  186. #define CAR_SET_PEN_WIDTH 41
  187. // BRUSHINFO
  188. #define BI_SELECT_NULL 51
  189. #define BI_SELECT_SOLID 52
  190. #define BI_SELECT_HS_HORIZONTAL 53
  191. #define BI_SELECT_HS_VERTICAL 54
  192. #define BI_SELECT_HS_FDIAGONAL 55
  193. #define BI_SELECT_HS_BDIAGONAL 56
  194. #define BI_SELECT_HS_CROSS 57
  195. #define BI_SELECT_HS_DIAGCROSS 58
  196. #define BI_CREATE_BYTE_2 59
  197. #define BI_SELECT_BRUSHSTYLE 60
  198. // LINEINFO
  199. #define LI_SELECT_SOLID 61
  200. #define LI_SELECT_DASH 62
  201. #define LI_SELECT_DOT 63
  202. #define LI_SELECT_DASHDOT 64
  203. #define LI_SELECT_DASHDOTDOT 65
  204. // VECTOROUTPUT
  205. // add 95/5/9 for npdl2p (Nakamura)
  206. #define VO_ELLIPSE 70
  207. #define VO_E_PIE 71
  208. #define VO_E_ARC 72
  209. #define VO_E_CHORD 73
  210. #define VO_CIRCLE 74
  211. #define VO_RECT 75
  212. #define VO_RECT_P 76
  213. // VECTORSUPPORT
  214. #define VS_BIGIN_POLYDEF 81
  215. #define VS_WINDFILL 83
  216. #define VS_ALTFILL 84
  217. #define VS_STROKE 85
  218. // VECTORPAGE
  219. #define VP_E_FLAT_J_BEVEL 91
  220. #define VP_E_ROUND_J_MITER 92
  221. #define VP_E_SQUARE_J_ROUND 93
  222. #define VP_TRANSPARENT 94
  223. #define VP_OPAQUE 95
  224. #define VP_J_BEVEL 96
  225. #define VP_J_MITER 97
  226. #define VP_J_ROUND 98
  227. #define VP_INIT_VECT 99
  228. #define VP_CLIP 100
  229. //CURSORMOVE
  230. #define CM_XY_ABS 101
  231. //POLYVECT
  232. #define PV_BEGIN 111
  233. #define PV_CONTINUE 112
  234. #define PV_BEGIN_BEZ 113
  235. #define PV_CONTINUE_BEZ 114
  236. #define PV_END 115
  237. //IMAGE CONTROL
  238. #define KAICHO4 120
  239. #define KAICHO8 121
  240. //COLOR MODE
  241. #define COLOR_8 200
  242. #define COLOR_TRUE 201