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.

349 lines
11 KiB

  1. /*++
  2. Copyright (c) 1990-2003 Microsoft Corporation
  3. Module Name:
  4. plotui.h
  5. Abstract:
  6. This module contains all plotters's user interface common defines
  7. Author:
  8. 02-Dec-1993 Thu 09:56:07 created
  9. [Environment:]
  10. GDI Device Driver - Plotter.
  11. [Notes:]
  12. Revision History:
  13. --*/
  14. #ifndef _PLOTUI_
  15. #define _PLOTUI_
  16. //
  17. // For compilers that don't support nameless unions
  18. //
  19. #ifndef DUMMYUNIONNAME
  20. #ifdef NONAMELESSUNION
  21. #define DUMMYUNIONNAME u
  22. #define DUMMYUNIONNAME2 u2
  23. #define DUMMYUNIONNAME3 u3
  24. #else
  25. #define DUMMYUNIONNAME
  26. #define DUMMYUNIONNAME2
  27. #define DUMMYUNIONNAME3
  28. #endif
  29. #endif
  30. //
  31. // PrinterINFO data structure which used by following calls to map a hPrinter
  32. // to this data structrue by follwoing funciton
  33. //
  34. // 1. DrvDeviceCapabilities()
  35. // 2. PrinterProperties()
  36. // @@BEGIN_DDKSPLIT
  37. // 3. DrvDocumentProperties()
  38. // 4. DrvAdvancedDocumentProperties()
  39. // @@END_DDKSPLIT
  40. //
  41. #define PIF_UPDATE_PERMISSION 0x01
  42. #define PIF_DOCPROP 0x02
  43. typedef struct _PRINTERINFO {
  44. HANDLE hPrinter; // Handle to the printer belong to here
  45. POPTITEM pOptItem;
  46. LPWSTR pHelpFile; // pointer to the help file
  47. PFORM_INFO_1 pFI1Base; // intalled form
  48. PPLOTGPC pPlotGPC; // loaded/updated Plotter GPC data
  49. WORD cOptItem;
  50. BYTE Flags;
  51. BYTE IdxPenSet; // plotter pen data set
  52. DWORD dmErrBits; // ErrorBits for DM_
  53. PLOTDEVMODE PlotDM; // Validated PLOTDEVMODE
  54. PAPERINFO CurPaper; // Current loaded form on the device
  55. PPDATA PPData; // Printer Prop Data
  56. HANDLE hCPSUI; // handle to the common ui pages
  57. PCOMPROPSHEETUI pCPSUI; // pointer to COMPROPSHEETUI
  58. PPLOTDEVMODE pPlotDMIn; // input devmode
  59. PPLOTDEVMODE pPlotDMOut; // output devmode
  60. DWORD dw64Align; // QWORD alignment.
  61. DWORD ExtraData; // starting of extra data
  62. } PRINTERINFO, *PPRINTERINFO;
  63. #define PI_PADJHTINFO(pPI) (PDEVHTINFO)&((pPI)->ExtraData)
  64. #define PI_PDEVHTADJDATA(pPI) (PDEVHTADJDATA)(PI_PADJHTINFO(pPI) + 1)
  65. #define PI_PPENDATA(pPI) (PPENDATA)&((pPI)->ExtraData)
  66. typedef struct _DOCPROPINFO {
  67. HWND hWnd;
  68. DWORD Result;
  69. DOCUMENTPROPERTYHEADER DPHdr;
  70. } DOCPROPINFO, *PDOCPROPINFO;
  71. typedef struct _DEVPROPINFO {
  72. HWND hWnd;
  73. DWORD Result;
  74. DEVICEPROPERTYHEADER DPHdr;
  75. } DEVPROPINFO, *PDEVPROPINFO;
  76. typedef UINT (* _CREATEOIFUNC)(PPRINTERINFO pPI,
  77. POPTITEM pOptItem,
  78. LPVOID pOIData);
  79. #define CREATEOIFUNC UINT
  80. typedef struct _OPDATA {
  81. WORD Flags;
  82. WORD IDSName;
  83. WORD IconID;
  84. union {
  85. WORD Style;
  86. WORD IDSSeparator;
  87. } DUMMYUNIONNAME;
  88. union {
  89. WORD wParam;
  90. WORD IDSCheckedName;
  91. } DUMMYUNIONNAME2;
  92. SHORT sParam;
  93. } OPDATA, *POPDATA;
  94. #define ODF_PEN 0x00000001
  95. #define ODF_RASTER 0x00000002
  96. #define ODF_PEN_RASTER (ODF_PEN | ODF_RASTER)
  97. #define ODF_COLOR 0x00000004
  98. #define ODF_ROLLFEED 0x00000008
  99. #define ODF_ECB 0x00000010
  100. #define ODF_INC_IDSNAME 0x00000020
  101. #define ODF_INC_ICONID 0x00000040
  102. #define ODF_NO_INC_POPDATA 0x00000080
  103. #define ODF_COLLAPSE 0x00000100
  104. #define ODF_CALLBACK 0x00000200
  105. #define ODF_NO_PAPERTRAY 0x00000400
  106. #define ODF_CALLCREATEOI 0x00000800
  107. #define ODF_MANUAL_FEED 0x00001000
  108. #define OI_LEVEL_1 0
  109. #define OI_LEVEL_2 1
  110. #define OI_LEVEL_3 2
  111. #define OI_LEVEL_4 3
  112. #define OI_LEVEL_5 4
  113. #define OI_LEVEL_6 5
  114. typedef struct _OIDATA {
  115. DWORD Flags;
  116. BYTE NotUsed;
  117. BYTE Level;
  118. BYTE DMPubID;
  119. BYTE Type;
  120. WORD IDSName;
  121. union {
  122. WORD IconID;
  123. WORD Style;
  124. } DUMMYUNIONNAME;
  125. WORD HelpIdx;
  126. WORD cOPData;
  127. union {
  128. POPDATA pOPData;
  129. _CREATEOIFUNC pfnCreateOI;
  130. } DUMMYUNIONNAME2;
  131. } OIDATA, *POIDATA;
  132. #define PI_OFF(x) (WORD)FIELD_OFFSET(PRINTERINFO, x)
  133. #define PLOTDM_OFF(x) (WORD)FIELD_OFFSET(PLOTDEVMODE, x)
  134. #define OPTIF_NONE 0
  135. #define PP_FORMTRAY_ASSIGN (DMPUB_USER + 0)
  136. #define PP_INSTALLED_FORM (DMPUB_USER + 1)
  137. #define PP_MANUAL_FEED_METHOD (DMPUB_USER + 2)
  138. #define PP_PRINT_FORM_OPTIONS (DMPUB_USER + 3)
  139. #define PP_AUTO_ROTATE (DMPUB_USER + 4)
  140. #define PP_PRINT_SMALLER_PAPER (DMPUB_USER + 5)
  141. #define PP_HT_SETUP (DMPUB_USER + 6)
  142. #define PP_INSTALLED_PENSET (DMPUB_USER + 7)
  143. #define PP_PEN_SETUP (DMPUB_USER + 8)
  144. #define PP_PENSET (DMPUB_USER + 9)
  145. #define PP_PEN_NUM (DMPUB_USER + 10)
  146. #define DP_HTCLRADJ (DMPUB_USER + 0)
  147. #define DP_FILL_TRUETYPE (DMPUB_USER + 1)
  148. #define DP_QUICK_POSTER_MODE (DMPUB_USER + 2)
  149. //
  150. // Icon ID
  151. //
  152. #define IDI_RASTER_ROLLFEED 64089
  153. #define IDI_RASTER_TRAYFEED 64090
  154. #define IDI_PEN_ROLLFEED 64087
  155. #define IDI_PEN_TRAYFEED 64088
  156. #define IDI_ROLLPAPER 64091
  157. #define IDI_PEN_SETUP 64093
  158. #define IDI_PENSET 64092
  159. #define IDI_DEFAULT_PENCLR 1007
  160. #define IDI_PENCLR 64092
  161. #define IDI_AUTO_ROTATE_NO 1009
  162. #define IDI_AUTO_ROTATE_YES 1010
  163. #define IDI_PRINT_SMALLER_PAPER_NO 1011
  164. #define IDI_PRINT_SMALLER_PAPER_YES 1012
  165. #define IDI_MANUAL_CX 1013
  166. #define IDI_MANUAL_CY 1014
  167. #define IDI_FILL_TRUETYPE_NO 1015
  168. #define IDI_FILL_TRUETYPE_YES 1016
  169. #define IDI_COLOR_FIRST IDI_WHITE
  170. #define IDI_WHITE 1100
  171. #define IDI_BLACK 1101
  172. #define IDI_RED 1102
  173. #define IDI_GREEN 1103
  174. #define IDI_YELLOW 1104
  175. #define IDI_BLUE 1105
  176. #define IDI_MAGENTA 1106
  177. #define IDI_CYAN 1107
  178. #define IDI_ORANGE 1108
  179. #define IDI_BROWN 1109
  180. #define IDI_VIOLET 1110
  181. #define IDI_COLOR_LAST IDI_VIOLET
  182. //
  183. // String table ID
  184. //
  185. #define IDS_PLOTTER_DRIVER 1900
  186. #define IDS_CAUTION 1901
  187. #define IDS_NO_MEMORY 1902
  188. #define IDS_INVALID_DATA 1903
  189. #define IDS_FORM_TOO_BIG 1904
  190. #define IDS_INV_DMSIZE 1905
  191. #define IDS_INV_DMVERSION 1906
  192. #define IDS_INV_DMDRIVEREXTRA 1907
  193. #define IDS_INV_DMCOLOR 1908
  194. #define IDS_INV_DMCOPIES 1909
  195. #define IDS_INV_DMSCALE 1910
  196. #define IDS_INV_DMORIENTATION 1911
  197. #define IDS_INV_DMFORM 1912
  198. #define IDS_INV_DMQUALITY 1913
  199. #define IDS_FORM_NOT_AVAI 1914
  200. #define IDS_MODEL 1915
  201. #define IDS_HELP_FILENAME 1916
  202. #define IDS_NO_HELP 1918
  203. #define IDS_PP_NO_SAVE 1919
  204. #define IDS_INSTALLED_FORM 2030
  205. #define IDS_MANUAL_FEEDER 2040
  206. #define IDS_MANUAL_FEED_METHOD 2041
  207. #define IDS_MANUAL_CX 2042
  208. #define IDS_MANUAL_CY 2043
  209. #define IDS_ROLLFEED 2044
  210. #define IDS_MAINFEED 2045
  211. #define IDS_PRINT_FORM_OPTIONS 2050
  212. #define IDS_AUTO_ROTATE 2051
  213. #define IDS_PRINT_SAMLLER_PAPER 2052
  214. #define IDS_INSTALLED_PENSET 2060
  215. #define IDS_PEN_SETUP 2061
  216. #define IDS_PENSET_FIRST IDS_PENSET_1
  217. #define IDS_PENSET_1 2070
  218. #define IDS_PENSET_2 2071
  219. #define IDS_PENSET_3 2072
  220. #define IDS_PENSET_4 2073
  221. #define IDS_PENSET_5 2074
  222. #define IDS_PENSET_6 2075
  223. #define IDS_PENSET_7 2076
  224. #define IDS_PENSET_8 2077
  225. #define IDS_PENSET_LAST IDS_PENSET_8
  226. #define IDS_PEN_NUM 2100
  227. #define IDS_DEFAULT_PENCLR 2101
  228. #define IDS_QUALITY_FIRST IDS_QUALITY_DRAFT
  229. #define IDS_QUALITY_DRAFT 2110
  230. #define IDS_QUALITY_LOW 2111
  231. #define IDS_QUALITY_MEDIUM 2112
  232. #define IDS_QUALITY_HIGH 2113
  233. #define IDS_QUALITY_LAST IDS_QUALITY_HIGH
  234. #define IDS_COLOR_FIRST IDS_WHITE
  235. #define IDS_WHITE 2120
  236. #define IDS_BLACK 2121
  237. #define IDS_RED 2122
  238. #define IDS_GREEN 2123
  239. #define IDS_YELLOW 2124
  240. #define IDS_BLUE 2125
  241. #define IDS_MAGENTA 2126
  242. #define IDS_CYAN 2127
  243. #define IDS_ORANGE 2128
  244. #define IDS_BROWN 2129
  245. #define IDS_VIOLET 2130
  246. #define IDS_COLOR_LAST IDS_VIOLET
  247. #define IDS_FILL_TRUETYPE 2140
  248. #define IDS_POSTER_MODE 2150
  249. #define IDS_USERFORM 2200
  250. //
  251. // Help Index for Printer Properties
  252. //
  253. #define IDH_FORMTRAYASSIGN 5000
  254. #define IDH_FORM_ROLL_FEEDER 5010
  255. #define IDH_FORM_MAIN_FEEDER 5020
  256. #define IDH_FORM_MANUAL_FEEDER 5030
  257. #define IDH_MANUAL_FEED_METHOD 5040
  258. #define IDH_PRINT_FORM_OPTIONS 5050
  259. #define IDH_AUTO_ROTATE 5060
  260. #define IDH_PRINT_SMALLER_PAPER 5070
  261. #define IDH_HALFTONE_SETUP 5080
  262. #define IDH_INSTALLED_PENSET 5090
  263. #define IDH_PEN_SETUP 5100
  264. #define IDH_PENSET 5110
  265. #define IDH_PEN_NUM 5120
  266. //
  267. // Help Index for Document Properties
  268. #define IDH_FORMNAME 5500
  269. #define IDH_ORIENTATION 5510
  270. #define IDH_COPIES_COLLATE 5520
  271. #define IDH_PRINTQUALITY 5530
  272. #define IDH_COLOR 5540
  273. #define IDH_SCALE 5550
  274. #define IDH_HTCLRADJ 5560
  275. #define IDH_FILL_TRUETYPE 5570
  276. #define IDH_POSTER_MODE 5580
  277. //
  278. // Count of characters
  279. //
  280. #define CCHOF(x) (sizeof(x)/sizeof(*(x)))
  281. #endif // _PLOTUI_