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.

1710 lines
38 KiB

  1. /*++
  2. Copyright (c) 1996-1997 Microsoft Corporation
  3. Module Name:
  4. printoem.h
  5. Abstract:
  6. Declarations for Windows NT printer driver OEM plugins
  7. --*/
  8. #ifndef _PRINTOEM_
  9. #define _PRINTOEM_
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. //
  14. // Current OEM plugin interface version number
  15. //
  16. #define PRINTER_OEMINTF_VERSION 0x00010000
  17. #define OEM_MODE_PUBLISHER 0x00000001
  18. typedef struct _PUBLISHERINFO {
  19. DWORD dwMode; // flags for publisher
  20. WORD wMinoutlinePPEM; // min size to download as Type1
  21. WORD wMaxbitmapPPEM; // max size to download as Type3
  22. } PUBLISHERINFO, *PPUBLISHERINFO;
  23. #define OEMGI_GETSIGNATURE 1
  24. #define OEMGI_GETINTERFACEVERSION 2
  25. #define OEMGI_GETVERSION 3
  26. #define OEMGI_GETPUBLISHERINFO 4
  27. //
  28. // OEMGetInfo
  29. //
  30. BOOL APIENTRY
  31. OEMGetInfo(
  32. IN DWORD dwMode,
  33. OUT PVOID pBuffer,
  34. IN DWORD cbSize,
  35. OUT PDWORD pcbNeeded
  36. );
  37. BOOL APIENTRY
  38. OEMDriverDMS(
  39. PVOID pDevObj,
  40. PVOID pBuffer,
  41. DWORD cbSize,
  42. PDWORD pcbNeeded
  43. );
  44. //
  45. // OEMDevMode
  46. //
  47. #define OEMDM_SIZE 1
  48. #define OEMDM_DEFAULT 2
  49. #define OEMDM_CONVERT 3
  50. #define OEMDM_MERGE 4
  51. typedef struct _OEMDMPARAM {
  52. DWORD cbSize; // size of OEM_DEVMODEPARAM
  53. PVOID pdriverobj; // reference to driver data structure
  54. HANDLE hPrinter; // PRINTER handle
  55. HANDLE hModule; // OEM module handle
  56. PDEVMODE pPublicDMIn; // public devmode in
  57. PDEVMODE pPublicDMOut; // public devmode out
  58. PVOID pOEMDMIn; // OEM private devmode in
  59. PVOID pOEMDMOut; // OEM private devmode out
  60. DWORD cbBufSize; // output size of pOEMDMOut buffer
  61. } OEMDMPARAM, *POEMDMPARAM;
  62. typedef struct _OEM_DMEXTRAHEADER {
  63. DWORD dwSize; // size of OEM extra data
  64. DWORD dwSignature; // Unique OEM signature
  65. DWORD dwVersion; // OEM DLL version number
  66. } OEM_DMEXTRAHEADER, *POEM_DMEXTRAHEADER;
  67. //
  68. // USERDATA for OPTITEM.UserData
  69. //
  70. typedef struct _USERDATA {
  71. DWORD dwSize; // Size of this structure
  72. ULONG_PTR dwItemID; // XXX_ITEM or pointer to FEATURE
  73. PSTR pKeyWordName; // Keyword name
  74. DWORD dwReserved[8];
  75. } USERDATA, *PUSERDATA;
  76. BOOL APIENTRY
  77. OEMDevMode(
  78. DWORD dwMode,
  79. POEMDMPARAM pOemDMParam
  80. );
  81. //
  82. // Callback function provided by the driver to
  83. // allow OEM plugins access/set/update to driver private settings
  84. //
  85. typedef BOOL (APIENTRY *PFN_DrvGetDriverSetting)(
  86. PVOID pdriverobj,
  87. PCSTR Feature,
  88. PVOID pOutput,
  89. DWORD cbSize,
  90. PDWORD pcbNeeded,
  91. PDWORD pdwOptionsReturned
  92. );
  93. //
  94. // Callback function provided by the driver to
  95. // allow OEM plugins upgrade private registry settings.
  96. //
  97. typedef BOOL (APIENTRY *PFN_DrvUpgradeRegistrySetting)(
  98. HANDLE hPrinter,
  99. PCSTR pFeature,
  100. PCSTR pOption
  101. );
  102. //
  103. // Callback function provided by the driver UI to
  104. // allow OEM plugins to update the driver UI settings and
  105. // shows constraint. This function is called only when the UI is present.
  106. //
  107. typedef BOOL (APIENTRY *PFN_DrvUpdateUISetting)(
  108. PVOID pdriverobj,
  109. PVOID pOptItem,
  110. DWORD dwPreviousSelection,
  111. DWORD dwMode
  112. );
  113. // Predefined feature indices used for accessing driver private settings
  114. #define OEMGDS_MIN_DOCSTICKY 1
  115. #define OEMGDS_PSDM_FLAGS 1 // DWORD - misc. flag bits
  116. #define OEMGDS_PSDM_DIALECT 2 // INT - PS output option
  117. #define OEMGDS_PSDM_TTDLFMT 3 // INT - TrueType font downloading option
  118. #define OEMGDS_PSDM_NUP 4 // INT - N-up option
  119. #define OEMGDS_PSDM_PSLEVEL 5 // INT - target language level
  120. #define OEMGDS_PSDM_CUSTOMSIZE 6 // 5*DWORD - custom page size parameters
  121. #define OEMGDS_UNIDM_GPDVER 0x4000 // WORD - GPD Version
  122. #define OEMGDS_UNIDM_FLAGS 0x4001 // DWORD - misc flag bits
  123. // Indices for private devmode fields - start at 0x4000
  124. #define OEMGDS_MIN_PRINTERSTICKY 0x8000
  125. #define OEMGDS_PRINTFLAGS 0x8000 // DWORD - misc. flag bits
  126. #define OEMGDS_FREEMEM 0x8001 // DWORD - amount of VM, ps only
  127. #define OEMGDS_JOBTIMEOUT 0x8002 // DWORD - job timeout, ps only
  128. #define OEMGDS_WAITTIMEOUT 0x8003 // DWORD - wait timeout, ps only
  129. #define OEMGDS_PROTOCOL 0x8004 // WORD - output protocol, ps only
  130. #define OEMGDS_MINOUTLINE 0x8005 // WORD - min outline font size, ps only
  131. #define OEMGDS_MAXBITMAP 0x8006 // WORD - max bitmap font size, ps only
  132. #define OEMGDS_MAX 0x10000
  133. // dwType flags for use with STDMETHOD (DrvGetGPDData)
  134. #define GPD_OEMCUSTOMDATA 1
  135. /*******************************************************************************
  136. *
  137. * Definitions used by kernel-mode rendering module only:
  138. * Make sure the macro KERNEL_MODE is defined and
  139. * the header file winddi.h is included before this file.
  140. */
  141. #ifdef KERNEL_MODE
  142. //
  143. // OEMEnableDriver
  144. //
  145. BOOL APIENTRY
  146. OEMEnableDriver(
  147. DWORD dwOemIntfVersion,
  148. DWORD cbSize,
  149. PDRVENABLEDATA pded
  150. );
  151. typedef struct _DEVOBJ *PDEVOBJ;
  152. typedef PVOID PDEVOEM;
  153. typedef DWORD (APIENTRY *PFN_DrvWriteSpoolBuf)(
  154. PDEVOBJ pdevobj,
  155. PVOID pBuffer,
  156. DWORD cbSize
  157. );
  158. typedef DWORD (APIENTRY *PFN_DrvWriteAbortBuf)(
  159. PDEVOBJ pdevobj,
  160. PVOID pBuffer,
  161. DWORD cbSize,
  162. DWORD dwWait
  163. );
  164. typedef INT (APIENTRY *PFN_DrvXMoveTo)(
  165. PDEVOBJ pdevobj,
  166. INT x,
  167. DWORD dwFlags
  168. );
  169. typedef INT (APIENTRY *PFN_DrvYMoveTo)(
  170. PDEVOBJ pdevobj,
  171. INT y,
  172. DWORD dwFlags
  173. );
  174. typedef BOOL (APIENTRY *PFN_DrvGetStandardVariable)(
  175. PDEVOBJ pdevobj,
  176. DWORD dwIndex,
  177. PVOID pBuffer,
  178. DWORD cbSize,
  179. PDWORD pcbNeeded
  180. );
  181. typedef enum _STDVARIABLEINDEX{
  182. SVI_NUMDATABYTES, // "NumOfDataBytes"
  183. SVI_WIDTHINBYTES, // "RasterDataWidthInBytes"
  184. SVI_HEIGHTINPIXELS, // "RasterDataHeightInPixels"
  185. SVI_COPIES, // "NumOfCopies"
  186. SVI_PRINTDIRECTION, // "PrintDirInCCDegrees"
  187. SVI_DESTX, // "DestX"
  188. SVI_DESTY, // "DestY"
  189. SVI_DESTXREL, // "DestXRel"
  190. SVI_DESTYREL, // "DestYRel"
  191. SVI_LINEFEEDSPACING, // "LinefeedSpacing"
  192. SVI_RECTXSIZE, // "RectXSize"
  193. SVI_RECTYSIZE, // "RectYSize"
  194. SVI_GRAYPERCENT, // "GrayPercentage"
  195. SVI_NEXTFONTID, // "NextFontID"
  196. SVI_NEXTGLYPH, // "NextGlyph"
  197. SVI_PHYSPAPERLENGTH, // "PhysPaperLength"
  198. SVI_PHYSPAPERWIDTH, // "PhysPaperWidth"
  199. SVI_FONTHEIGHT, // "FontHeight"
  200. SVI_FONTWIDTH, // "FontWidth"
  201. SVI_FONTMAXWIDTH, // "FontMaxWidth"
  202. SVI_FONTBOLD, // "FontBold"
  203. SVI_FONTITALIC, // "FontItalic"
  204. SVI_FONTUNDERLINE, // "FontUnderline"
  205. SVI_FONTSTRIKETHRU, // "FontStrikeThru"
  206. SVI_CURRENTFONTID, // "CurrentFontID"
  207. SVI_TEXTYRES, // "TextYRes"
  208. SVI_TEXTXRES, // "TextXRes"
  209. SVI_GRAPHICSYRES, // "GraphicsYRes"
  210. SVI_GRAPHICSXRES, // "GraphicsXRes"
  211. SVI_ROP3, // "Rop3"
  212. SVI_REDVALUE, // "RedValue"
  213. SVI_GREENVALUE, // "GreenValue"
  214. SVI_BLUEVALUE, // "BlueValue"
  215. SVI_PALETTEINDEXTOPROGRAM, // "PaletteIndexToProgram"
  216. SVI_CURRENTPALETTEINDEX, // "CurrentPaletteIndex"
  217. SVI_PATTERNBRUSH_TYPE, // "PatternBrushType"
  218. SVI_PATTERNBRUSH_ID, // "PatternBrushID"
  219. SVI_PATTERNBRUSH_SIZE, // "PatternBrushSize"
  220. SVI_CURSORORIGINX, // "CursorOriginX"
  221. SVI_CURSORORIGINY, // "CursorOriginY"
  222. // this is in MasterUnits and in the coordinates of the currently selected orientation.
  223. // this value is defined as ImageableOrigin - CursorOrigin
  224. SVI_PAGENUMBER, // "PageNumber"
  225. // this value tracks number of times DrvStartBand has been called since
  226. // StartDoc.
  227. SVI_MAX // Just a placeholder do not use.
  228. }STDVARIABLEINDEX;
  229. typedef BOOL (APIENTRY *PFN_DrvUnidriverTextOut)(
  230. SURFOBJ *pso,
  231. STROBJ *pstro,
  232. FONTOBJ *pfo,
  233. CLIPOBJ *pco,
  234. RECTL *prclExtra,
  235. RECTL *prclOpaque,
  236. BRUSHOBJ *pboFore,
  237. BRUSHOBJ *pboOpaque,
  238. POINTL *pptlBrushOrg,
  239. MIX mix
  240. );
  241. //
  242. // bit fields defined for dwFlags
  243. //
  244. // Note: The following Bit values are reserved for an internal use!
  245. // 0x4000
  246. // 0x8000
  247. //
  248. //
  249. #define MV_UPDATE 0x0001
  250. #define MV_RELATIVE 0x0002
  251. #define MV_GRAPHICS 0x0004
  252. #define MV_PHYSICAL 0x0008
  253. #define MV_SENDXMOVECMD 0x0010
  254. #define MV_SENDYMOVECMD 0x0020
  255. typedef struct _DRVPROCS {
  256. PFN_DrvWriteSpoolBuf DrvWriteSpoolBuf; // common to both pscript and unidrv
  257. PFN_DrvXMoveTo DrvXMoveTo; // unidrv specific
  258. PFN_DrvYMoveTo DrvYMoveTo; // unidrv specific
  259. PFN_DrvGetDriverSetting DrvGetDriverSetting;// common to both pscript and unidrv
  260. PFN_DrvGetStandardVariable BGetStandardVariable; // unidrv specific
  261. PFN_DrvUnidriverTextOut DrvUnidriverTextOut; // unidrv specific
  262. PFN_DrvWriteAbortBuf DrvWriteAbortBuf; // unidrv specific
  263. } DRVPROCS, *PDRVPROCS;
  264. typedef struct _DEVOBJ {
  265. DWORD dwSize; // size of DEVOBJ structure
  266. PDEVOEM pdevOEM; // pointer to OEM's device data
  267. HANDLE hEngine; // GDI handle for current printer
  268. HANDLE hPrinter; // spooler handle for current printer
  269. HANDLE hOEM; // handle to OEM dll
  270. PDEVMODE pPublicDM; // public devmode
  271. PVOID pOEMDM; // OEM private devmode
  272. PDRVPROCS pDrvProcs; // pointer to kernel mode helper function table
  273. } DEVOBJ;
  274. //
  275. // OEMDisableDriver
  276. //
  277. VOID APIENTRY
  278. OEMDisableDriver(
  279. VOID
  280. );
  281. //
  282. // OEMEnablePDEV
  283. //
  284. PDEVOEM APIENTRY
  285. OEMEnablePDEV(
  286. PDEVOBJ pdevobj,
  287. PWSTR pPrinterName,
  288. ULONG cPatterns,
  289. HSURF *phsurfPatterns,
  290. ULONG cjGdiInfo,
  291. GDIINFO *pGdiInfo,
  292. ULONG cjDevInfo,
  293. DEVINFO *pDevInfo,
  294. DRVENABLEDATA *pded
  295. );
  296. //
  297. // OEMDisablePDEV
  298. //
  299. VOID APIENTRY
  300. OEMDisablePDEV(
  301. PDEVOBJ pdevobj
  302. );
  303. //
  304. // OEMResetPDEV
  305. //
  306. BOOL APIENTRY
  307. OEMResetPDEV(
  308. PDEVOBJ pdevobjOld,
  309. PDEVOBJ pdevobjNew
  310. );
  311. //
  312. // OEMCommand - PSCRIPT only
  313. //
  314. DWORD APIENTRY
  315. OEMCommand(
  316. PDEVOBJ pdevobj,
  317. DWORD dwIndex,
  318. PVOID pData,
  319. DWORD cbSize
  320. );
  321. INT APIENTRY
  322. OEMCommandCallback(
  323. PDEVOBJ pdevobj,
  324. DWORD dwCallbackID,
  325. DWORD dwCount,
  326. PDWORD pdwParams
  327. );
  328. //
  329. // OEMImageProcessing - UNIDRV only
  330. //
  331. typedef struct {
  332. DWORD dwSize;
  333. POINT ptOffset;
  334. PSTR pHalftoneOption;
  335. BOOL bBanding;
  336. BOOL bBlankBand;
  337. } IPPARAMS, *PIPPARAMS;
  338. PBYTE APIENTRY
  339. OEMImageProcessing(
  340. PDEVOBJ pdevobj,
  341. PBYTE pSrcBitmap,
  342. PBITMAPINFOHEADER pBitmapInfoHeader,
  343. PBYTE pColorTable,
  344. DWORD dwCallbackID,
  345. PIPPARAMS pIPParams
  346. );
  347. //
  348. // OEMFilterGraphics - UNIDRV only
  349. //
  350. BOOL APIENTRY
  351. OEMFilterGraphics(
  352. PDEVOBJ pdevobj,
  353. PBYTE pBuf,
  354. DWORD dwLen
  355. );
  356. //
  357. // OEMCompression - UNIDRV only
  358. //
  359. INT APIENTRY
  360. OEMCompression(
  361. PDEVOBJ pdevobj,
  362. PBYTE pInBuf,
  363. PBYTE pOutBuf,
  364. DWORD dwInLen,
  365. DWORD dwOutLen
  366. );
  367. //
  368. // OEMHalftone - UNIDRV only
  369. //
  370. BOOL APIENTRY
  371. OEMHalftonePattern(
  372. PDEVOBJ pdevobj,
  373. PBYTE pHTPattern,
  374. DWORD dwHTPatternX,
  375. DWORD dwHTPatternY,
  376. DWORD dwHTNumPatterns,
  377. DWORD dwCallbackID,
  378. PBYTE pResource,
  379. DWORD dwResourceSize
  380. );
  381. //
  382. // OEMMemoryUsage - UNIDRV only
  383. //
  384. typedef struct {
  385. DWORD dwFixedMemoryUsage;
  386. DWORD dwPercentMemoryUsage;
  387. DWORD dwMaxBandSize;
  388. } OEMMEMORYUSAGE, *POEMMEMORYUSAGE;
  389. VOID APIENTRY
  390. OEMMemoryUsage(
  391. PDEVOBJ pdevobj,
  392. POEMMEMORYUSAGE pMemoryUsage
  393. );
  394. //
  395. // OEMTTYGetInfo - UNIDRV only
  396. //
  397. INT APIENTRY
  398. OEMTTYGetInfo(
  399. PDEVOBJ pdevobj,
  400. DWORD dwInfoIndex,
  401. PVOID pOutputBuf,
  402. DWORD dwSize,
  403. DWORD *pcbcNeeded
  404. );
  405. #define OEMTTY_INFO_MARGINS 1
  406. #define OEMTTY_INFO_CODEPAGE 2
  407. #define OEMTTY_INFO_NUM_UFMS 3
  408. #define OEMTTY_INFO_UFM_IDS 4
  409. //
  410. // UNIDRV font callback
  411. //
  412. typedef BOOL (*PFNGETINFO)(struct _UNIFONTOBJ*, DWORD, PVOID, DWORD, PDWORD);
  413. typedef struct _UNIFONTOBJ {
  414. ULONG ulFontID;
  415. DWORD dwFlags; // General flags
  416. IFIMETRICS *pIFIMetrics; // Pointer to IFIMETRICS
  417. PFNGETINFO pfnGetInfo; // Pointer to UNIFONTOBJ_GetInfo callback
  418. } UNIFONTOBJ, *PUNIFONTOBJ;
  419. //
  420. // UNIFONTOBJ.dwFlags
  421. //
  422. #define UFOFLAG_TTFONT 0x00000001
  423. #define UFOFLAG_TTDOWNLOAD_BITMAP 0x00000002
  424. #define UFOFLAG_TTDOWNLOAD_TTOUTLINE 0x00000004
  425. #define UFOFLAG_TTOUTLINE_BOLD_SIM 0x00000008
  426. #define UFOFLAG_TTOUTLINE_ITALIC_SIM 0x00000010
  427. #define UFOFLAG_TTOUTLINE_VERTICAL 0x00000020
  428. #define UFOFLAG_TTSUBSTITUTED 0x00000040
  429. //
  430. // UNIFONTOBJ callback ID
  431. //
  432. #define UFO_GETINFO_FONTOBJ 1
  433. #define UFO_GETINFO_GLYPHSTRING 2
  434. #define UFO_GETINFO_GLYPHBITMAP 3
  435. #define UFO_GETINFO_GLYPHWIDTH 4
  436. #define UFO_GETINFO_MEMORY 5
  437. #define UFO_GETINFO_STDVARIABLE 6
  438. //
  439. // UFO_GETINFO_FONTOBJ callback structure
  440. //
  441. typedef struct _GETINFO_FONTOBJ {
  442. DWORD dwSize; // Size of this structure
  443. FONTOBJ *pFontObj; // Pointer to the FONTOBJ
  444. } GETINFO_FONTOBJ, *PGETINFO_FONTOBJ;
  445. //
  446. // UFO_GETINFO_FONTOBJ callback structure
  447. //
  448. typedef struct _GETINFO_GLYPHSTRING {
  449. DWORD dwSize; // Size of this structure
  450. DWORD dwCount; // Count of glyphs in pGlyphIn
  451. DWORD dwTypeIn; // Glyph type of pGlyphIn, TYPE_GLYPHID/TYPE_HANDLE.
  452. PVOID pGlyphIn; // Pointer to the input glyph string
  453. DWORD dwTypeOut; // Glyph type of pGlyphOut, TYPE_UNICODE/TYPE_TRANSDATA.
  454. PVOID pGlyphOut; // Pointer to the output glyph string
  455. DWORD dwGlyphOutSize; // The size of pGlyphOut buffer
  456. } GETINFO_GLYPHSTRING, *PGETINFO_GLYPHSTRING;
  457. //
  458. // UFO_GETINFO_GLYPHBITMAP
  459. //
  460. typedef struct _GETINFO_GLYPHBITMAP {
  461. DWORD dwSize; // Size of this structure
  462. HGLYPH hGlyph; // Glyph hangle passed in OEMDownloadCharGlyph
  463. GLYPHDATA *pGlyphData; // Pointer to the GLYPHDATA data structure
  464. } GETINFO_GLYPHBITMAP, *PGETINFO_GLYPHBITMAP;
  465. //
  466. // UFO_GETINFO_GLYPHWIDTH
  467. //
  468. typedef struct _GETINFO_GLYPHWIDTH {
  469. DWORD dwSize; // Size of this structure
  470. DWORD dwType; // Type of glyph stirng in pGlyph, TYPE_GLYPHHANDLE/GLYPHID.
  471. DWORD dwCount; // Count of glyph in pGlyph
  472. PVOID pGlyph; // Pointer to a glyph string
  473. PLONG plWidth; // Pointer to the buffer of width table.
  474. // Minidriver has to prepare this.
  475. } GETINFO_GLYPHWIDTH, *PGETINFO_GLYPHWIDTH;
  476. //
  477. // UFO_GETINFO_MEMORY
  478. //
  479. typedef struct _GETINFO_MEMORY {
  480. DWORD dwSize;
  481. DWORD dwRemainingMemory;
  482. } GETINFO_MEMORY, PGETINFO_MEMROY;
  483. //
  484. // UFO_GETINFO_STDVARIABLE
  485. //
  486. // OEM DLL has to prepare all StdVar buffer and set ID in dwStdVarID.
  487. //
  488. typedef struct _GETINFO_STDVAR {
  489. DWORD dwSize;
  490. DWORD dwNumOfVariable;
  491. struct {
  492. DWORD dwStdVarID;
  493. LONG lStdVariable;
  494. } StdVar[1];
  495. } GETINFO_STDVAR, *PGETINFO_STDVAR;
  496. #define FNT_INFO_PRINTDIRINCCDEGREES 0 // PrintDirInCCDegrees
  497. #define FNT_INFO_GRAYPERCENTAGE 1 // GrayPercentage
  498. #define FNT_INFO_NEXTFONTID 2 // NextfontID
  499. #define FNT_INFO_NEXTGLYPH 3 // NextGlyph
  500. #define FNT_INFO_FONTHEIGHT 4 // FontHeight
  501. #define FNT_INFO_FONTWIDTH 5 // FontWidth
  502. #define FNT_INFO_FONTBOLD 6 // FontBold
  503. #define FNT_INFO_FONTITALIC 7 // FontItalic
  504. #define FNT_INFO_FONTUNDERLINE 8 // FontUnderline
  505. #define FNT_INFO_FONTSTRIKETHRU 9 // FontStrikeThru
  506. #define FNT_INFO_CURRENTFONTID 10 // Current
  507. #define FNT_INFO_TEXTYRES 11 // TextYRes
  508. #define FNT_INFO_TEXTXRES 12 // TextXRes
  509. #define FNT_INFO_FONTMAXWIDTH 13 // FontMaxWidth
  510. #define FNT_INFO_MAX 14
  511. //
  512. // OEMDownloadFontheader - UNIDRV only
  513. //
  514. DWORD APIENTRY
  515. OEMDownloadFontHeader(
  516. PDEVOBJ pdevobj,
  517. PUNIFONTOBJ pUFObj
  518. );
  519. //
  520. // OEMDownloadCharGlyph - UNIDRV only
  521. //
  522. DWORD APIENTRY
  523. OEMDownloadCharGlyph(
  524. PDEVOBJ pdevobj,
  525. PUNIFONTOBJ pUFObj,
  526. HGLYPH hGlyph,
  527. PDWORD pdwWidth
  528. );
  529. //
  530. // OEMTTDownloadMethod - UNIDRV only
  531. //
  532. DWORD APIENTRY
  533. OEMTTDownloadMethod(
  534. PDEVOBJ pdevobj,
  535. PUNIFONTOBJ pUFObj
  536. );
  537. #define TTDOWNLOAD_DONTCARE 0
  538. #define TTDOWNLOAD_GRAPHICS 1
  539. #define TTDOWNLOAD_BITMAP 2
  540. #define TTDOWNLOAD_TTOUTLINE 3
  541. //
  542. // OEMOutputCharStr - UNIDRV only
  543. //
  544. VOID APIENTRY
  545. OEMOutputCharStr(
  546. PDEVOBJ pdevobj,
  547. PUNIFONTOBJ pUFObj,
  548. DWORD dwType,
  549. DWORD dwCount,
  550. PVOID pGlyph
  551. );
  552. #define TYPE_UNICODE 1
  553. #define TYPE_TRANSDATA 2
  554. #define TYPE_GLYPHHANDLE 3
  555. #define TYPE_GLYPHID 4
  556. //
  557. // OEMSendFontCmd - UNIDRV only
  558. //
  559. typedef struct _FINVOCATION {
  560. DWORD dwCount; // Size of command
  561. PBYTE pubCommand; // Pointer to font selection command
  562. } FINVOCATION, *PFINVOCATION;
  563. VOID APIENTRY
  564. OEMSendFontCmd(
  565. PDEVOBJ pdevobj,
  566. PUNIFONTOBJ pUFObj,
  567. PFINVOCATION pFInv
  568. );
  569. //
  570. // OEMTextOutAsBitmap - UNIDRV only
  571. //
  572. BOOL APIENTRY
  573. OEMTextOutAsBitmap(
  574. SURFOBJ *pso,
  575. STROBJ *pstro,
  576. FONTOBJ *pfo,
  577. CLIPOBJ *pco,
  578. RECTL *prclExtra,
  579. RECTL *prclOpaque,
  580. BRUSHOBJ *pboFore,
  581. BRUSHOBJ *pboOpaque,
  582. POINTL *pptlOrg,
  583. MIX mix
  584. );
  585. //
  586. // OEMBitBlt
  587. //
  588. BOOL APIENTRY
  589. OEMBitBlt(
  590. SURFOBJ *psoTrg,
  591. SURFOBJ *psoSrc,
  592. SURFOBJ *psoMask,
  593. CLIPOBJ *pco,
  594. XLATEOBJ *pxlo,
  595. RECTL *prclTrg,
  596. POINTL *pptlSrc,
  597. POINTL *pptlMask,
  598. BRUSHOBJ *pbo,
  599. POINTL *pptlBrush,
  600. ROP4 rop4
  601. );
  602. //
  603. // OEMStretchBlt
  604. //
  605. BOOL APIENTRY
  606. OEMStretchBlt(
  607. SURFOBJ *psoDest,
  608. SURFOBJ *psoSrc,
  609. SURFOBJ *psoMask,
  610. CLIPOBJ *pco,
  611. XLATEOBJ *pxlo,
  612. COLORADJUSTMENT *pca,
  613. POINTL *pptlHTOrg,
  614. RECTL *prclDest,
  615. RECTL *prclSrc,
  616. POINTL *pptlMask,
  617. ULONG iMode
  618. );
  619. //
  620. // OEMCopyBits
  621. //
  622. BOOL APIENTRY
  623. OEMCopyBits(
  624. SURFOBJ *psoDest,
  625. SURFOBJ *psoSrc,
  626. CLIPOBJ *pco,
  627. XLATEOBJ *pxlo,
  628. RECTL *prclDest,
  629. POINTL *pptlSrc
  630. );
  631. //
  632. // OEMTextOut
  633. //
  634. BOOL APIENTRY
  635. OEMTextOut(
  636. SURFOBJ *pso,
  637. STROBJ *pstro,
  638. FONTOBJ *pfo,
  639. CLIPOBJ *pco,
  640. RECTL *prclExtra,
  641. RECTL *prclOpaque,
  642. BRUSHOBJ *pboFore,
  643. BRUSHOBJ *pboOpaque,
  644. POINTL *pptlOrg,
  645. MIX mix
  646. );
  647. //
  648. // OEMStrokePath
  649. //
  650. BOOL APIENTRY
  651. OEMStrokePath(
  652. SURFOBJ *pso,
  653. PATHOBJ *ppo,
  654. CLIPOBJ *pco,
  655. XFORMOBJ *pxo,
  656. BRUSHOBJ *pbo,
  657. POINTL *pptlBrushOrg,
  658. LINEATTRS *plineattrs,
  659. MIX mix
  660. );
  661. //
  662. // OEMFillPath
  663. //
  664. BOOL APIENTRY
  665. OEMFillPath(
  666. SURFOBJ *pso,
  667. PATHOBJ *ppo,
  668. CLIPOBJ *pco,
  669. BRUSHOBJ *pbo,
  670. POINTL *pptlBrushOrg,
  671. MIX mix,
  672. FLONG flOptions
  673. );
  674. //
  675. // OEMStrokeAndFillPath
  676. //
  677. BOOL APIENTRY
  678. OEMStrokeAndFillPath(
  679. SURFOBJ *pso,
  680. PATHOBJ *ppo,
  681. CLIPOBJ *pco,
  682. XFORMOBJ *pxo,
  683. BRUSHOBJ *pboStroke,
  684. LINEATTRS *plineattrs,
  685. BRUSHOBJ *pboFill,
  686. POINTL *pptlBrushOrg,
  687. MIX mixFill,
  688. FLONG flOptions
  689. );
  690. //
  691. // OEMRealizeBrush
  692. //
  693. BOOL APIENTRY
  694. OEMRealizeBrush(
  695. BRUSHOBJ *pbo,
  696. SURFOBJ *psoTarget,
  697. SURFOBJ *psoPattern,
  698. SURFOBJ *psoMask,
  699. XLATEOBJ *pxlo,
  700. ULONG iHatch
  701. );
  702. //
  703. // OEMStartPage
  704. //
  705. BOOL APIENTRY
  706. OEMStartPage(
  707. SURFOBJ *pso
  708. );
  709. //
  710. // OEMSendPage
  711. //
  712. BOOL APIENTRY
  713. OEMSendPage(
  714. SURFOBJ *pso
  715. );
  716. //
  717. // OEMEscape
  718. //
  719. ULONG APIENTRY
  720. OEMEscape(
  721. SURFOBJ *pso,
  722. ULONG iEsc,
  723. ULONG cjIn,
  724. PVOID pvIn,
  725. ULONG cjOut,
  726. PVOID pvOut
  727. );
  728. //
  729. // OEMStartDoc
  730. //
  731. BOOL APIENTRY
  732. OEMStartDoc(
  733. SURFOBJ *pso,
  734. PWSTR pwszDocName,
  735. DWORD dwJobId
  736. );
  737. //
  738. // OEMEndDoc
  739. //
  740. BOOL APIENTRY
  741. OEMEndDoc(
  742. SURFOBJ *pso,
  743. FLONG fl
  744. );
  745. //
  746. // OEMQueryFont
  747. //
  748. PIFIMETRICS APIENTRY
  749. OEMQueryFont(
  750. DHPDEV dhpdev,
  751. ULONG_PTR iFile,
  752. ULONG iFace,
  753. ULONG_PTR *pid
  754. );
  755. //
  756. // OEMQueryFontTree
  757. //
  758. PVOID APIENTRY
  759. OEMQueryFontTree(
  760. DHPDEV dhpdev,
  761. ULONG_PTR iFile,
  762. ULONG iFace,
  763. ULONG iMode,
  764. ULONG_PTR *pid
  765. );
  766. //
  767. // OEMQueryFontData
  768. //
  769. LONG APIENTRY
  770. OEMQueryFontData(
  771. DHPDEV dhpdev,
  772. FONTOBJ *pfo,
  773. ULONG iMode,
  774. HGLYPH hg,
  775. GLYPHDATA *pgd,
  776. PVOID pv,
  777. ULONG cjSize
  778. );
  779. //
  780. // OEMQueryAdvanceWidths
  781. //
  782. BOOL APIENTRY
  783. OEMQueryAdvanceWidths(
  784. DHPDEV dhpdev,
  785. FONTOBJ *pfo,
  786. ULONG iMode,
  787. HGLYPH *phg,
  788. PVOID pvWidths,
  789. ULONG cGlyphs
  790. );
  791. //
  792. // OEMFontManagement
  793. //
  794. ULONG APIENTRY
  795. OEMFontManagement(
  796. SURFOBJ *pso,
  797. FONTOBJ *pfo,
  798. ULONG iMode,
  799. ULONG cjIn,
  800. PVOID pvIn,
  801. ULONG cjOut,
  802. PVOID pvOut
  803. );
  804. //
  805. // OEMGetGlyphMode
  806. //
  807. ULONG APIENTRY
  808. OEMGetGlyphMode(
  809. DHPDEV dhpdev,
  810. FONTOBJ *pfo
  811. );
  812. BOOL APIENTRY
  813. OEMNextBand(
  814. SURFOBJ *pso,
  815. POINTL *pptl
  816. );
  817. BOOL APIENTRY
  818. OEMStartBanding(
  819. SURFOBJ *pso,
  820. POINTL *pptl
  821. );
  822. ULONG APIENTRY
  823. OEMDitherColor(
  824. DHPDEV dhpdev,
  825. ULONG iMode,
  826. ULONG rgbColor,
  827. ULONG *pulDither
  828. );
  829. BOOL APIENTRY
  830. OEMPaint(
  831. SURFOBJ *pso,
  832. CLIPOBJ *pco,
  833. BRUSHOBJ *pbo,
  834. POINTL *pptlBrushOrg,
  835. MIX mix
  836. );
  837. BOOL APIENTRY
  838. OEMLineTo(
  839. SURFOBJ *pso,
  840. CLIPOBJ *pco,
  841. BRUSHOBJ *pbo,
  842. LONG x1,
  843. LONG y1,
  844. LONG x2,
  845. LONG y2,
  846. RECTL *prclBounds,
  847. MIX mix
  848. );
  849. #ifndef WINNT_40
  850. //
  851. // OEMStretchBltROP
  852. //
  853. BOOL APIENTRY
  854. OEMStretchBltROP(
  855. SURFOBJ *psoDest,
  856. SURFOBJ *psoSrc,
  857. SURFOBJ *psoMask,
  858. CLIPOBJ *pco,
  859. XLATEOBJ *pxlo,
  860. COLORADJUSTMENT *pca,
  861. POINTL *pptlHTOrg,
  862. RECTL *prclDest,
  863. RECTL *prclSrc,
  864. POINTL *pptlMask,
  865. ULONG iMode,
  866. BRUSHOBJ *pbo,
  867. ROP4 rop4
  868. );
  869. //
  870. // OEMPlgBlt
  871. //
  872. BOOL APIENTRY
  873. OEMPlgBlt(
  874. SURFOBJ *psoDst,
  875. SURFOBJ *psoSrc,
  876. SURFOBJ *psoMask,
  877. CLIPOBJ *pco,
  878. XLATEOBJ *pxlo,
  879. COLORADJUSTMENT *pca,
  880. POINTL *pptlBrushOrg,
  881. POINTFIX *pptfixDest,
  882. RECTL *prclSrc,
  883. POINTL *pptlMask,
  884. ULONG iMode
  885. );
  886. //
  887. // OEMAlphaBlend
  888. //
  889. BOOL APIENTRY
  890. OEMAlphaBlend(
  891. SURFOBJ *psoDest,
  892. SURFOBJ *psoSrc,
  893. CLIPOBJ *pco,
  894. XLATEOBJ *pxlo,
  895. RECTL *prclDest,
  896. RECTL *prclSrc,
  897. BLENDOBJ *pBlendObj
  898. );
  899. //
  900. // OEMGradientFill
  901. //
  902. BOOL APIENTRY
  903. OEMGradientFill(
  904. SURFOBJ *psoDest,
  905. CLIPOBJ *pco,
  906. XLATEOBJ *pxlo,
  907. TRIVERTEX *pVertex,
  908. ULONG nVertex,
  909. PVOID pMesh,
  910. ULONG nMesh,
  911. RECTL *prclExtents,
  912. POINTL *pptlDitherOrg,
  913. ULONG ulMode
  914. );
  915. //
  916. // OEMIcmCreateTransform
  917. //
  918. HANDLE APIENTRY
  919. OEMIcmCreateColorTransform(
  920. DHPDEV dhpdev,
  921. LPLOGCOLORSPACEW pLogColorSpace,
  922. PVOID pvSourceProfile,
  923. ULONG cjSourceProfile,
  924. PVOID pvDestProfile,
  925. ULONG cjDestProfile,
  926. PVOID pvTargetProfile,
  927. ULONG cjTargetProfile,
  928. DWORD dwReserved
  929. );
  930. //
  931. // OEMIcmDeleteTransform
  932. //
  933. BOOL APIENTRY
  934. OEMIcmDeleteColorTransform(
  935. DHPDEV dhpdev,
  936. HANDLE hcmXform
  937. );
  938. //
  939. // OEMQueryDeviceSupport
  940. //
  941. BOOL APIENTRY
  942. OEMQueryDeviceSupport(
  943. SURFOBJ *pso,
  944. XLATEOBJ *pxlo,
  945. XFORMOBJ *pxo,
  946. ULONG iType,
  947. ULONG cjIn,
  948. PVOID pvIn,
  949. ULONG cjOut,
  950. PVOID pvOut
  951. );
  952. //
  953. // OEMTransparentBlt
  954. //
  955. BOOL APIENTRY
  956. OEMTransparentBlt(
  957. SURFOBJ *psoDst,
  958. SURFOBJ *psoSrc,
  959. CLIPOBJ *pco,
  960. XLATEOBJ *pxlo,
  961. RECTL *prclDst,
  962. RECTL *prclSrc,
  963. ULONG iTransColor,
  964. ULONG ulReserved
  965. );
  966. #endif // !WINNT_40
  967. //
  968. // Function prototype define's for the driver hooks.
  969. //
  970. // NOTE: These are only needed for NT4. For NT5, they are defined in winddi.h.
  971. //
  972. #ifdef WINNT_40
  973. typedef BOOL (APIENTRY *LPFNDLLINITIALIZE)(
  974. ULONG ulReason
  975. );
  976. typedef BOOL (APIENTRY *PFN_DrvBitBlt)(
  977. SURFOBJ *psoTrg,
  978. SURFOBJ *psoSrc,
  979. SURFOBJ *psoMask,
  980. CLIPOBJ *pco,
  981. XLATEOBJ *pxlo,
  982. RECTL *prclTrg,
  983. POINTL *pptlSrc,
  984. POINTL *pptlMask,
  985. BRUSHOBJ *pbo,
  986. POINTL *pptlBrush,
  987. ROP4 rop4
  988. );
  989. typedef BOOL (APIENTRY *PFN_DrvStretchBlt)(
  990. SURFOBJ *psoDest,
  991. SURFOBJ *psoSrc,
  992. SURFOBJ *psoMask,
  993. CLIPOBJ *pco,
  994. XLATEOBJ *pxlo,
  995. COLORADJUSTMENT *pca,
  996. POINTL *pptlHTOrg,
  997. RECTL *prclDest,
  998. RECTL *prclSrc,
  999. POINTL *pptlMask,
  1000. ULONG iMode
  1001. );
  1002. typedef BOOL (APIENTRY *PFN_DrvCopyBits)(
  1003. SURFOBJ *psoDest,
  1004. SURFOBJ *psoSrc,
  1005. CLIPOBJ *pco,
  1006. XLATEOBJ *pxlo,
  1007. RECTL *prclDest,
  1008. POINTL *pptlSrc
  1009. );
  1010. typedef BOOL (APIENTRY *PFN_DrvTextOut)(
  1011. SURFOBJ *pso,
  1012. STROBJ *pstro,
  1013. FONTOBJ *pfo,
  1014. CLIPOBJ *pco,
  1015. RECTL *prclExtra,
  1016. RECTL *prclOpaque,
  1017. BRUSHOBJ *pboFore,
  1018. BRUSHOBJ *pboOpaque,
  1019. POINTL *pptlOrg,
  1020. MIX mix
  1021. );
  1022. typedef BOOL (APIENTRY *PFN_DrvStrokePath)(
  1023. SURFOBJ *pso,
  1024. PATHOBJ *ppo,
  1025. CLIPOBJ *pco,
  1026. XFORMOBJ *pxo,
  1027. BRUSHOBJ *pbo,
  1028. POINTL *pptlBrushOrg,
  1029. LINEATTRS *plineattrs,
  1030. MIX mix
  1031. );
  1032. typedef BOOL (APIENTRY *PFN_DrvFillPath)(
  1033. SURFOBJ *pso,
  1034. PATHOBJ *ppo,
  1035. CLIPOBJ *pco,
  1036. BRUSHOBJ *pbo,
  1037. POINTL *pptlBrushOrg,
  1038. MIX mix,
  1039. FLONG flOptions
  1040. );
  1041. typedef BOOL (APIENTRY *PFN_DrvStrokeAndFillPath)(
  1042. SURFOBJ *pso,
  1043. PATHOBJ *ppo,
  1044. CLIPOBJ *pco,
  1045. XFORMOBJ *pxo,
  1046. BRUSHOBJ *pboStroke,
  1047. LINEATTRS *plineattrs,
  1048. BRUSHOBJ *pboFill,
  1049. POINTL *pptlBrushOrg,
  1050. MIX mixFill,
  1051. FLONG flOptions
  1052. );
  1053. typedef BOOL (APIENTRY *PFN_DrvRealizeBrush)(
  1054. BRUSHOBJ *pbo,
  1055. SURFOBJ *psoTarget,
  1056. SURFOBJ *psoPattern,
  1057. SURFOBJ *psoMask,
  1058. XLATEOBJ *pxlo,
  1059. ULONG iHatch
  1060. );
  1061. typedef BOOL (APIENTRY *PFN_DrvStartPage)(
  1062. SURFOBJ *pso
  1063. );
  1064. typedef BOOL (APIENTRY *PFN_DrvSendPage)(
  1065. SURFOBJ *pso
  1066. );
  1067. typedef ULONG (APIENTRY *PFN_DrvEscape)(
  1068. SURFOBJ *pso,
  1069. ULONG iEsc,
  1070. ULONG cjIn,
  1071. PVOID pvIn,
  1072. ULONG cjOut,
  1073. PVOID pvOut
  1074. );
  1075. typedef BOOL (APIENTRY *PFN_DrvStartDoc)(
  1076. SURFOBJ *pso,
  1077. PWSTR pwszDocName,
  1078. DWORD dwJobId
  1079. );
  1080. typedef BOOL (APIENTRY *PFN_DrvEndDoc)(
  1081. SURFOBJ *pso,
  1082. FLONG fl
  1083. );
  1084. typedef PIFIMETRICS (APIENTRY *PFN_DrvQueryFont)(
  1085. DHPDEV dhpdev,
  1086. ULONG_PTR iFile,
  1087. ULONG iFace,
  1088. ULONG_PTR *pid
  1089. );
  1090. typedef PVOID (APIENTRY *PFN_DrvQueryFontTree)(
  1091. DHPDEV dhpdev,
  1092. ULONG_PTR iFile,
  1093. ULONG iFace,
  1094. ULONG iMode,
  1095. ULONG_PTR *pid
  1096. );
  1097. typedef LONG (APIENTRY *PFN_DrvQueryFontData)(
  1098. DHPDEV dhpdev,
  1099. FONTOBJ *pfo,
  1100. ULONG iMode,
  1101. HGLYPH hg,
  1102. GLYPHDATA *pgd,
  1103. PVOID pv,
  1104. ULONG cjSize
  1105. );
  1106. typedef BOOL (APIENTRY *PFN_DrvQueryAdvanceWidths)(
  1107. DHPDEV dhpdev,
  1108. FONTOBJ *pfo,
  1109. ULONG iMode,
  1110. HGLYPH *phg,
  1111. PVOID pvWidths,
  1112. ULONG cGlyphs
  1113. );
  1114. typedef ULONG (APIENTRY *PFN_DrvFontManagement)(
  1115. SURFOBJ *pso,
  1116. FONTOBJ *pfo,
  1117. ULONG iMode,
  1118. ULONG cjIn,
  1119. PVOID pvIn,
  1120. ULONG cjOut,
  1121. PVOID pvOut
  1122. );
  1123. typedef ULONG (APIENTRY *PFN_DrvGetGlyphMode)(
  1124. DHPDEV dhpdev,
  1125. FONTOBJ *pfo
  1126. );
  1127. typedef BOOL (APIENTRY *PFN_DrvNextBand)(
  1128. SURFOBJ *pso,
  1129. POINTL *pptl
  1130. );
  1131. typedef BOOL (APIENTRY *PFN_DrvStartBanding)(
  1132. SURFOBJ *pso,
  1133. POINTL *pptl
  1134. );
  1135. typedef ULONG (APIENTRY *PFN_DrvDitherColor)(
  1136. DHPDEV dhpdev,
  1137. ULONG iMode,
  1138. ULONG rgbColor,
  1139. ULONG *pulDither
  1140. );
  1141. typedef BOOL (APIENTRY *PFN_DrvPaint)(
  1142. SURFOBJ *pso,
  1143. CLIPOBJ *pco,
  1144. BRUSHOBJ *pbo,
  1145. POINTL *pptlBrushOrg,
  1146. MIX mix
  1147. );
  1148. typedef BOOL (APIENTRY *PFN_DrvLineTo)(
  1149. SURFOBJ *pso,
  1150. CLIPOBJ *pco,
  1151. BRUSHOBJ *pbo,
  1152. LONG x1,
  1153. LONG y1,
  1154. LONG x2,
  1155. LONG y2,
  1156. RECTL *prclBounds,
  1157. MIX mix
  1158. );
  1159. #endif // WINNT_40
  1160. //
  1161. // for the IPrintOemPS2::GetPDEVAdjustment call
  1162. //
  1163. #define PDEV_ADJUST_PAPER_MARGIN_TYPE 1
  1164. typedef struct _PDEV_ADJUST_PAPER_MARGIN {
  1165. RECTL rcImageableArea; // contains the imageable area in 0.001 mm units
  1166. } PDEV_ADJUST_PAPER_MARGIN;
  1167. #define PDEV_HOSTFONT_ENABLED_TYPE 2
  1168. typedef struct _PDEV_HOSTFONT_ENABLED {
  1169. BOOL bHostfontEnabled;
  1170. } PDEV_HOSTFONT_ENABLED;
  1171. #define PDEV_USE_TRUE_COLOR_TYPE 3
  1172. typedef struct _PDEV_USE_TRUE_COLOR {
  1173. BOOL bUseTrueColor;
  1174. } PDEV_USE_TRUE_COLOR;
  1175. #endif // KERNEL_MODE
  1176. /*******************************************************************************
  1177. *
  1178. * Definitions used by user-mode UI module only:
  1179. * Make sure the macro KERNEL_MODE is NOT defined and
  1180. * the header file winddiui.h is included before this file.
  1181. *
  1182. */
  1183. #ifndef KERNEL_MODE
  1184. //
  1185. // Reports capability of simulated features
  1186. //
  1187. typedef struct _SIMULATE_CAPS_1 {
  1188. DWORD dwLevel;
  1189. DWORD dwPageOrderFlags; // Reverse page order
  1190. DWORD dwNumberOfCopies; // Max number of copies
  1191. DWORD dwCollate; // Collate support
  1192. DWORD dwNupOptions; // The (1-base) bit set represents the N-up option available.
  1193. // 0x0001 means 1-up
  1194. // 0x0002 means 2-up
  1195. // 0x0008 means 4-up
  1196. // 0x812B means (1,2,4,6,9,16)
  1197. } SIMULATE_CAPS_1, *PSIMULATE_CAPS_1;
  1198. //
  1199. // Reference to driver data structure. This is passed to
  1200. // most of the OEM UI DLL entrypoints.
  1201. //
  1202. typedef struct _OEMUIPROCS {
  1203. PFN_DrvGetDriverSetting DrvGetDriverSetting;
  1204. PFN_DrvUpdateUISetting DrvUpdateUISetting;
  1205. } OEMUIPROCS, *POEMUIPROCS;
  1206. typedef struct _OEMUIOBJ {
  1207. DWORD cbSize; // size of this structure
  1208. POEMUIPROCS pOemUIProcs; // pointer to user mode helper function table
  1209. } OEMUIOBJ, *POEMUIOBJ;
  1210. //
  1211. // OEMCommonUIProp
  1212. //
  1213. typedef struct _OEMCUIPPARAM *POEMCUIPPARAM;
  1214. typedef LONG (APIENTRY *OEMCUIPCALLBACK)(PCPSUICBPARAM, POEMCUIPPARAM);
  1215. typedef struct _OEMCUIPPARAM {
  1216. DWORD cbSize; // size of this structure
  1217. POEMUIOBJ poemuiobj; // reference to driver data structure
  1218. HANDLE hPrinter; // handle to the current printer
  1219. PWSTR pPrinterName; // name of current printer
  1220. HANDLE hModule; // instance handle to OEM DLL
  1221. HANDLE hOEMHeap; // handle to the OEM memory heap
  1222. PDEVMODE pPublicDM; // public devmode
  1223. PVOID pOEMDM; // OEM private devmode
  1224. DWORD dwFlags; // misc. flag bits
  1225. POPTITEM pDrvOptItems; // pointer to driver items
  1226. DWORD cDrvOptItems; // number of driver items
  1227. POPTITEM pOEMOptItems; // pointer to OEM items
  1228. DWORD cOEMOptItems; // number of OEM items
  1229. PVOID pOEMUserData; // pointer to OEM private data
  1230. OEMCUIPCALLBACK OEMCUIPCallback; // address of callback function
  1231. } OEMCUIPPARAM;
  1232. BOOL APIENTRY
  1233. OEMCommonUIProp(
  1234. DWORD dwMode,
  1235. POEMCUIPPARAM pOemCUIPParam
  1236. );
  1237. //
  1238. // OEMCommonUIProp dwMode parameter value
  1239. //
  1240. #define OEMCUIP_DOCPROP 1
  1241. #define OEMCUIP_PRNPROP 2
  1242. //
  1243. // OEMDocumentPropertySheets
  1244. //
  1245. LRESULT APIENTRY
  1246. OEMDocumentPropertySheets(
  1247. PPROPSHEETUI_INFO pPSUIInfo,
  1248. LPARAM lParam
  1249. );
  1250. //
  1251. // OEMDevicePropertySheets
  1252. //
  1253. LRESULT APIENTRY
  1254. OEMDevicePropertySheets(
  1255. PPROPSHEETUI_INFO pPSUIInfo,
  1256. LPARAM lParam
  1257. );
  1258. //
  1259. // pPSUIInfo->lParamInit is a pointer to _OEMUIPSPARAM structure defined below.
  1260. //
  1261. typedef struct _OEMUIPSPARAM {
  1262. DWORD cbSize; // size of this structure
  1263. POEMUIOBJ poemuiobj; // reference to driver data structure
  1264. HANDLE hPrinter; // handle to the current printer
  1265. PWSTR pPrinterName; // name of current printer
  1266. HANDLE hModule; // instance handle to OEM DLL
  1267. HANDLE hOEMHeap; // handle to the OEM memory heap
  1268. PDEVMODE pPublicDM; // public devmode
  1269. PVOID pOEMDM; // OEM private devmode
  1270. PVOID pOEMUserData; // pointer to OEM private data
  1271. DWORD dwFlags; // misc. flag bits
  1272. PVOID pOemEntry;
  1273. } OEMUIPSPARAM, *POEMUIPSPARAM;
  1274. //
  1275. // OEMDevQueryPrintEx
  1276. //
  1277. BOOL APIENTRY
  1278. OEMDevQueryPrintEx(
  1279. POEMUIOBJ poemuiobj,
  1280. PDEVQUERYPRINT_INFO pDQPInfo,
  1281. PDEVMODE pPublicDM,
  1282. PVOID pOEMDM
  1283. );
  1284. //
  1285. // OEMDeviceCapabilities
  1286. //
  1287. DWORD APIENTRY
  1288. OEMDeviceCapabilities(
  1289. POEMUIOBJ poemuiobj,
  1290. HANDLE hPrinter,
  1291. PWSTR pDeviceName,
  1292. WORD wCapability,
  1293. PVOID pOutput,
  1294. PDEVMODE pPublicDM,
  1295. PVOID pOEMDM,
  1296. DWORD dwLastResult
  1297. );
  1298. //
  1299. // OEMUpgradePrinter
  1300. //
  1301. BOOL APIENTRY
  1302. OEMUpgradePrinter(
  1303. DWORD dwLevel,
  1304. PBYTE pDriverUpgradeInfo
  1305. );
  1306. //
  1307. // OEMUpgradeRegistry
  1308. //
  1309. BOOL APIENTRY
  1310. OEMUpgradeRegistry(
  1311. DWORD dwLevel,
  1312. PBYTE pDriverUpgradeInfo,
  1313. PFN_DrvUpgradeRegistrySetting pfnUpgrade
  1314. );
  1315. //
  1316. // OEMPrinterEvent
  1317. //
  1318. BOOL APIENTRY
  1319. OEMPrinterEvent(
  1320. PWSTR pPrinterName,
  1321. INT iDriverEvent,
  1322. DWORD dwFlags,
  1323. LPARAM lParam
  1324. );
  1325. //
  1326. // OEMDriverEvent
  1327. //
  1328. BOOL APIENTRY
  1329. OEMPDriverEvent(
  1330. DWORD dwDriverEvent,
  1331. DWORD dwLevel,
  1332. LPBYTE pDriverInfo,
  1333. LPARAM lParam
  1334. );
  1335. //
  1336. // OEMQueryColorProfile
  1337. //
  1338. BOOL APIENTRY
  1339. OEMQueryColorProfile(
  1340. HANDLE hPrinter,
  1341. POEMUIOBJ poemuiobj,
  1342. PDEVMODE pPublicDM,
  1343. PVOID pOEMDM,
  1344. ULONG ulQueryMode,
  1345. VOID *pvProfileData,
  1346. ULONG *pcbProfileData,
  1347. FLONG *pflProfileData
  1348. );
  1349. //
  1350. // Font Installer dialog proc
  1351. //
  1352. INT_PTR CALLBACK
  1353. OEMFontInstallerDlgProc(
  1354. HWND hWnd,
  1355. UINT usMsg,
  1356. WPARAM wParam,
  1357. LPARAM lParam
  1358. );
  1359. BOOL CALLBACK
  1360. OEMUpdateExternalFonts(
  1361. HANDLE hPrinter,
  1362. HANDLE hHeap,
  1363. PWSTR pwstrCartridges
  1364. );
  1365. #endif // !KERNEL_MODE
  1366. //
  1367. // Datatypes for attributes plugin can get by calling core driver's
  1368. // following helper functions:
  1369. //
  1370. // GetGlobalAttribute, GetFeatureAttribute, GetOptionAttribute
  1371. //
  1372. typedef enum _EATTRIBUTE_DATATYPE {
  1373. kADT_UNKNOWN,
  1374. kADT_BOOL,
  1375. kADT_INT,
  1376. kADT_LONG,
  1377. kADT_DWORD,
  1378. kADT_ASCII, // NULL terminated ASCII string
  1379. kADT_UNICODE, // NULL terminated Unicode string
  1380. kADT_BINARY, // binary blob
  1381. kADT_SIZE,
  1382. kADT_RECT,
  1383. kADT_CUSTOMSIZEPARAMS, // array of CUSTOMSIZEPARAM structures
  1384. } EATTRIBUTE_DATATYPE;
  1385. //
  1386. // Data structure for storing information about PPD's *ParamCustomPageSize entries
  1387. //
  1388. #define CUSTOMPARAM_WIDTH 0
  1389. #define CUSTOMPARAM_HEIGHT 1
  1390. #define CUSTOMPARAM_WIDTHOFFSET 2
  1391. #define CUSTOMPARAM_HEIGHTOFFSET 3
  1392. #define CUSTOMPARAM_ORIENTATION 4
  1393. #define CUSTOMPARAM_MAX 5
  1394. typedef struct _CUSTOMSIZEPARAM {
  1395. LONG dwOrder; // order value
  1396. LONG lMinVal; // min value (in microns)
  1397. LONG lMaxVal; // max value (in microns)
  1398. } CUSTOMSIZEPARAM, *PCUSTOMSIZEPARAM;
  1399. //
  1400. // constants for SetOptions helper function
  1401. //
  1402. // SetOptions flag
  1403. //
  1404. #define SETOPTIONS_FLAG_RESOLVE_CONFLICT 0x00000001
  1405. #define SETOPTIONS_FLAG_KEEP_CONFLICT 0x00000002
  1406. //
  1407. // SetOptions result code
  1408. //
  1409. #define SETOPTIONS_RESULT_NO_CONFLICT 0
  1410. #define SETOPTIONS_RESULT_CONFLICT_RESOLVED 1
  1411. #define SETOPTIONS_RESULT_CONFLICT_REMAINED 2
  1412. #ifdef __cplusplus
  1413. }
  1414. #endif
  1415. #endif // !_PRINTOEM_