Source code of Windows XP (NT5)
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.

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