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.

180 lines
4.6 KiB

  1. ///////////////////////////////////////////////////////////////
  2. // fmlbp.h
  3. //
  4. // September.3,1997 H.Ishida (FPL)
  5. //
  6. // COPYRIGHT(C) FUJITSU LIMITED 1997
  7. // NTRAID#NTBUG9-553888-2002/03/22-yasuho-: mandatory changes (strsafe.h)
  8. #include <minidrv.h>
  9. #include <stdio.h>
  10. #include <prcomoem.h>
  11. #include <strsafe.h>
  12. #define FUFM_OEM_SIGNATURE 'FUFM'
  13. #define FUFM_OEM_VERSION 0x00010000L
  14. typedef const BYTE FAR* LPCBYTE;
  15. typedef struct tag_FUFM_OEM_EXTRADATA {
  16. OEM_DMEXTRAHEADER dmExtraHdr;
  17. } FUFM_OEM_EXTRADATA, *PFUFM_OEM_EXTRADATA;
  18. #define WRITESPOOLBUF(pdevobj, s, n) \
  19. ((pdevobj)->pDrvProcs->DrvWriteSpoolBuf((pdevobj), s, n))
  20. #define IS_VALID_FUFMPDEV(p) \
  21. ((p) != NULL && (p)->dwSignature == FUFM_OEM_SIGNATURE)
  22. #define FUFM_MASTER_TO_DEVICE(p,d) \
  23. ((p)->devData.dwResolution * (d) / FUFM_RESOLUTION_MASTER_UNIT)
  24. // FUFMDATA.dwSizeReduction
  25. #define FUFM_SIZE_REDUCTION_100 0
  26. #define FUFM_SIZE_REDUCTION_75 1
  27. #define FUFM_SIZE_REDUCTION_70 2
  28. #define FUFM_SIZE_REDUCTION_UNKNOWN ((DWORD)-1)
  29. // FUFMDATA.dwResolution
  30. #define FUFM_RESOLUTION_MASTER_UNIT 1200
  31. #define FUFM_RESOLUTION_240 240
  32. #define FUFM_RESOLUTION_400 400
  33. #define FUFM_RESOLUTION_UNKNOWN ((DWORD)-1)
  34. // FUFMDATA.dwPaperSize
  35. #define FUFM_PAPERSIZE_A3 0x00000003
  36. #define FUFM_PAPERSIZE_A4 0x00000004
  37. #define FUFM_PAPERSIZE_A5 0x00000005
  38. #define FUFM_PAPERSIZE_B4 0x00010004
  39. #define FUFM_PAPERSIZE_B5 0x00010005
  40. #define FUFM_PAPERSIZE_LETTER 0x00030000
  41. #define FUFM_PAPERSIZE_LEGAL 0x00020000
  42. #define FUFM_PAPERSIZE_JAPANESE_POSTCARD 0x00040000
  43. #define FUFM_PAPERSIZE_CUSTOM_SIZE 0x00090000
  44. #define FUFM_PAPERSIZE_UNKNOWN ((DWORD)-1)
  45. // FUFMDATA.dwPaperSource
  46. #define FUFM_PAPERSOURCE_AUTO 0x00010000
  47. #define FUFM_PAPERSOURCE_MANUAL 0x00000002
  48. #define FUFM_PAPERSOURCE_BIN1 0x00000000
  49. #define FUFM_PAPERSOURCE_BIN2 0x00000001
  50. #define FUFM_PAPERSOURCE_BIN3 0x00000003
  51. #define FUFM_PAPERSOURCE_UNKNOWN ((DWORD)-1)
  52. // FUFMDATA.dwPaperOrientation
  53. #define FUFM_PAPERORIENTATION_PORTRAIT 0
  54. #define FUFM_PAPERORIENTATION_LANDSCAPE 1
  55. #define FUFM_PAPERORIENTATION_UNKNOWN ((DWORD)-1)
  56. // FUFMDATA.dwFontAttributes
  57. #define FUFM_FONTATTR_BOLD 0x00000001
  58. #define FUFM_FONTATTR_ITALIC 0x00000002
  59. #define FUFM_FONTATTR_UNDERLINE 0x00000004
  60. #define FUFM_FONTATTR_STRIKEOUT 0x00000008
  61. typedef struct tag_FUFMDATA {
  62. DWORD dwSizeReduction;
  63. DWORD dwResolution;
  64. DWORD dwPaperSize;
  65. DWORD dwPaperSource;
  66. DWORD dwPaperOrientation;
  67. DWORD dwCopies;
  68. DWORD dwFontAttributes;
  69. } FUFMDATA;
  70. typedef FUFMDATA* PFUFMDATA;
  71. typedef const FUFMDATA* PCFUFMDATA;
  72. // FUFMPDEV.dwEmMode
  73. enum tag_FUFM_EMMODE {
  74. FUFM_EMMODE_FM,
  75. FUFM_EMMODE_ESCP
  76. };
  77. typedef enum tag_FUFM_EMMODE FUFM_EMMODE;
  78. // FUFMPDEV.dwFlags
  79. #define FUFM_FLAG_SCALABLEFONT 0x0001
  80. #define FUFM_FLAG_QUICKRESET 0x0002
  81. #define FUFM_FLAG_PAPER3 0x0004
  82. #define FUFM_FLAG_START_JOB_0 0
  83. #define FUFM_FLAG_START_JOB_1 FUFM_FLAG_SCALABLEFONT
  84. #define FUFM_FLAG_START_JOB_2 (FUFM_FLAG_SCALABLEFONT | FUFM_FLAG_QUICKRESET)
  85. #define FUFM_FLAG_START_JOB_3 (FUFM_FLAG_SCALABLEFONT | FUFM_FLAG_QUICKRESET | FUFM_FLAG_PAPER3)
  86. #define FUFM_FLAG_START_JOB_4 FUFM_FLAG_PAPER3
  87. // #251047: overlaps SBCS on vert mode
  88. #define FUFM_FLAG_VERTICALFONT 0x0008
  89. // #284409: SBCS rotated on vert mode
  90. #define FUFM_FLAG_FONTROTATED 0x0010
  91. // FUFMPDEV.dwPosChanged
  92. #define FUFM_X_POSCHANGED 0x0001
  93. #define FUFM_Y_POSCHANGED 0x0002
  94. typedef struct tag_FUFMPDEV {
  95. DWORD dwSignature;
  96. FUFM_EMMODE emMode;
  97. DWORD dwFlags;
  98. DWORD dwPosChanged;
  99. int x;
  100. int y;
  101. int iLinefeedSpacing;
  102. int cxfont; //#144637
  103. DWORD dwPaperWidth;
  104. DWORD dwPaperLength;
  105. int cyPage;
  106. FUFMDATA devData;
  107. FUFMDATA reqData;
  108. } FUFMPDEV, *PFUFMPDEV;
  109. // @Aug/31/98 ->
  110. #define MAX_COPIES_VALUE 999
  111. // @Aug/31/98 <-
  112. // Device font height and font width values calculated
  113. // form the IFIMETRICS field values. Must be the same way
  114. // what Unidrv is doing to calculate stdandard variables.
  115. // (Please check.)
  116. #define FH_IFI(p) ((p)->fwdUnitsPerEm)
  117. #define FW_IFI(p) ((p)->fwdAveCharWidth)
  118. // NTRAID#NTBUG9-587382-2002/03/27-v-sueyas-: Error handling
  119. // New interface functions with Unidrv callbacks.
  120. #ifdef __cplusplus
  121. extern "C" {
  122. #endif
  123. BOOL APIENTRY bOEMSendFontCmd(PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, PFINVOCATION pFInv);
  124. BOOL APIENTRY bOEMOutputCharStr(PDEVOBJ pdevobj, PUNIFONTOBJ pUFObj, DWORD dwType, DWORD dwCount, PVOID pGlyph);
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128. // end of fmlbp.h