2 * Copyright 2021 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 interface IXpsOMPrintTicketResource
;
22 interface IXpsOMDocumentStructureResource
;
23 interface IXpsOMSignatureBlockResourceCollection
;
24 interface IXpsOMPartUriCollection
;
26 interface IXpsOMStoryFragmentsResource
;
27 interface IXpsOMImageResource
;
28 interface IXpsOMResource
;
29 interface IXpsOMObjectFactory
;
30 interface IXpsOMSignatureBlockResource
;
31 interface IXpsOMDictionary
;
32 interface IXpsOMRemoteDictionaryResource
;
33 interface IXpsOMPartResources
;
34 interface IXpsOMDocument
;
35 interface IXpsOMPageReference
;
36 interface IXpsOMCanvas
;
37 interface IXpsOMFontResource
;
38 interface IXpsOMGlyphs
;
40 interface IXpsOMGeometry
;
41 interface IXpsOMGeometryFigure
;
42 interface IXpsOMMatrixTransform
;
43 interface IXpsOMColorProfileResource
;
44 interface IXpsOMSolidColorBrush
;
45 interface IXpsOMImageBrush
;
46 interface IXpsOMVisualBrush
;
47 interface IXpsOMGradientStop
;
48 interface IXpsOMLinearGradientBrush
;
49 interface IXpsOMRadialGradientBrush
;
50 interface IXpsOMCoreProperties
;
51 interface IXpsOMPackageWriter
;
52 interface IXpsOMPackage
;
54 typedef [v1_enum] enum
56 XPS_COLOR_TYPE_SRGB
= 1,
58 XPS_COLOR_TYPE_CONTEXT
61 typedef [v1_enum] enum
63 XPS_IMAGE_TYPE_JPEG
= 1,
70 typedef [v1_enum] enum
72 XPS_FONT_EMBEDDING_NORMAL
= 1,
73 XPS_FONT_EMBEDDING_OBFUSCATED
,
74 XPS_FONT_EMBEDDING_RESTRICTED
,
75 XPS_FONT_EMBEDDING_RESTRICTED_UNOBFUSCATED
78 typedef [v1_enum] enum
80 XPS_INTERLEAVING_OFF
= 1,
114 typedef union switch (XPS_COLOR_TYPE colorType
) value
116 case XPS_COLOR_TYPE_SRGB
:
119 UINT8 alpha
, red
, green
, blue
;
121 case XPS_COLOR_TYPE_SCRGB
:
124 FLOAT alpha
, red
, green
, blue
;
126 case XPS_COLOR_TYPE_CONTEXT
:
136 uuid(74eb2f0b
-a91e
-4486
-afac
-0fabeca3dfc6
)
138 interface IXpsOMPart
: IUnknown
141 [out, retval] IOpcPartUri
**partUri
145 [in] IOpcPartUri
*partUri
151 pointer_default(ref),
152 uuid(d1c87f0d
-e947
-4754-8a25
-971478f7e83e
)
154 interface IXpsOMDocumentCollection
: IUnknown
157 [out, retval] UINT32
*count
162 [out, retval] IXpsOMDocument
**document
167 [in] IXpsOMDocument
*document
176 [in] IXpsOMDocument
*document
180 [in] IXpsOMDocument
*document
186 pointer_default(ref),
187 uuid(56492eb4
-d8d5
-425e-8256-4c2b64ad0264
)
189 interface IXpsOMDocumentSequence
: IXpsOMPart
192 [out, retval] IXpsOMPackage
**package
195 HRESULT GetDocuments
(
196 [out, retval] IXpsOMDocumentCollection
**documents
199 HRESULT GetPrintTicketResource
(
200 [out, retval] IXpsOMPrintTicketResource
**printTicketResource
203 HRESULT SetPrintTicketResource
(
204 [in] IXpsOMPrintTicketResource
*printTicketResource
211 pointer_default(ref),
212 uuid(18c3df65
-81e1
-4674-91dc
-fc452f5a416f
)
214 interface IXpsOMPackage
: IUnknown
216 HRESULT GetDocumentSequence
(
217 [out, retval] IXpsOMDocumentSequence
**documentSequence
220 HRESULT SetDocumentSequence
(
221 [in] IXpsOMDocumentSequence
*documentSequence
224 HRESULT GetCoreProperties
(
225 [out, retval] IXpsOMCoreProperties
**coreProperties
228 HRESULT SetCoreProperties
(
229 [in] IXpsOMCoreProperties
*coreProperties
232 HRESULT GetDiscardControlPartName
(
233 [out, retval] IOpcPartUri
**discardControlPartUri
236 HRESULT SetDiscardControlPartName
(
237 [in] IOpcPartUri
*discardControlPartUri
240 HRESULT GetThumbnailResource
(
241 [out, retval] IXpsOMImageResource
**imageResource
244 HRESULT SetThumbnailResource
(
245 [in] IXpsOMImageResource
*imageResource
249 [in, string] LPCWSTR fileName
,
250 [in, unique] LPSECURITY_ATTRIBUTES securityAttributes
,
251 [in] DWORD flagsAndAttributes
,
252 [in] BOOL optimizeMarkupSize
255 HRESULT WriteToStream
(
256 [in] ISequentialStream
*stream
,
257 [in] BOOL optimizeMarkupSize
264 pointer_default(ref),
265 uuid(f9b2a685
-a50d
-4fc2
-b764
-b56e093ea0ca
),
267 interface IXpsOMObjectFactory
: IUnknown
269 HRESULT CreatePackage
(
270 [out, retval] IXpsOMPackage
**package
273 HRESULT CreatePackageFromFile
(
274 [in, string] LPCWSTR filename
,
275 [in] BOOL reuseObjects
,
276 [out, retval] IXpsOMPackage
**package
279 HRESULT CreatePackageFromStream
(
280 [in] IStream
*stream
,
281 [in] BOOL reuseObjects
,
282 [out, retval] IXpsOMPackage
**package
285 HRESULT CreateStoryFragmentsResource
(
286 [in] IStream
*acquiredStream
,
287 [in] IOpcPartUri
*partUri
,
288 [out, retval] IXpsOMStoryFragmentsResource
**storyFragmentsResource
291 HRESULT CreateDocumentStructureResource
(
292 [in] IStream
*acquiredStream
,
293 [in] IOpcPartUri
*partUri
,
294 [out, retval] IXpsOMDocumentStructureResource
**documentStructureResource
297 HRESULT CreateSignatureBlockResource
(
298 [in] IStream
*acquiredStream
,
299 [in] IOpcPartUri
*partUri
,
300 [out, retval] IXpsOMSignatureBlockResource
**signatureBlockResource
303 HRESULT CreateRemoteDictionaryResource
(
304 [in] IXpsOMDictionary
*dictionary
,
305 [in] IOpcPartUri
*partUri
,
306 [out, retval] IXpsOMRemoteDictionaryResource
**remoteDictionaryResource
309 HRESULT CreateRemoteDictionaryResourceFromStream
(
310 [in] IStream
*dictionaryMarkupStream
,
311 [in] IOpcPartUri
*dictionaryPartUri
,
312 [in] IXpsOMPartResources
*resources
,
313 [out, retval] IXpsOMRemoteDictionaryResource
**dictionaryResource
316 HRESULT CreatePartResources
(
317 [out, retval] IXpsOMPartResources
**partResources
320 HRESULT CreateDocumentSequence
(
321 [in] IOpcPartUri
*partUri
,
322 [out, retval] IXpsOMDocumentSequence
**documentSequence
325 HRESULT CreateDocument
(
326 [in] IOpcPartUri
*partUri
,
327 [out, retval] IXpsOMDocument
**document
330 HRESULT CreatePageReference
(
331 [in] const XPS_SIZE
*advisoryPageDimensions
,
332 [out, retval] IXpsOMPageReference
**pageReference
336 [in] const XPS_SIZE
*pageDimensions
,
337 [in, string] LPCWSTR language
,
338 [in] IOpcPartUri
*partUri
,
339 [out, retval] IXpsOMPage
**page
342 HRESULT CreatePageFromStream
(
343 [in] IStream
*pageMarkupStream
,
344 [in] IOpcPartUri
*partUri
,
345 [in] IXpsOMPartResources
*resources
,
346 [in] BOOL reuseObjects
,
347 [out, retval] IXpsOMPage
**page
350 HRESULT CreateCanvas
(
351 [out, retval] IXpsOMCanvas
**canvas
354 HRESULT CreateGlyphs
(
355 [in] IXpsOMFontResource
*fontResource
,
356 [out, retval] IXpsOMGlyphs
**glyphs
360 [out, retval] IXpsOMPath
**path
363 HRESULT CreateGeometry
(
364 [out, retval] IXpsOMGeometry
**geometry
367 HRESULT CreateGeometryFigure
(
368 [in] const XPS_POINT
*startPoint
,
369 [out, retval] IXpsOMGeometryFigure
**figure
372 HRESULT CreateMatrixTransform
(
373 [in] const XPS_MATRIX
*matrix
,
374 [out, retval] IXpsOMMatrixTransform
**transform
377 HRESULT CreateSolidColorBrush
(
378 [in] const XPS_COLOR
*color
,
379 [in] IXpsOMColorProfileResource
*colorProfile
,
380 [out, retval] IXpsOMSolidColorBrush
**solidColorBrush
383 HRESULT CreateColorProfileResource
(
384 [in] IStream
*acquiredStream
,
385 [in] IOpcPartUri
*partUri
,
386 [out, retval] IXpsOMColorProfileResource
**colorProfileResource
389 HRESULT CreateImageBrush
(
390 [in] IXpsOMImageResource
*image
,
391 [in] const XPS_RECT
*viewBox
,
392 [in] const XPS_RECT
*viewPort
,
393 [out, retval] IXpsOMImageBrush
**imageBrush
396 HRESULT CreateVisualBrush
(
397 [in] const XPS_RECT
*viewBox
,
398 [in] const XPS_RECT
*viewPort
,
399 [out, retval] IXpsOMVisualBrush
**visualBrush
402 HRESULT CreateImageResource
(
403 [in] IStream
*acquiredStream
,
404 [in] XPS_IMAGE_TYPE contentType
,
405 [in] IOpcPartUri
*partUri
,
406 [out, retval] IXpsOMImageResource
**imageResource
409 HRESULT CreatePrintTicketResource
(
410 [in] IStream
*acquiredStream
,
411 [in] IOpcPartUri
*partUri
,
412 [out, retval] IXpsOMPrintTicketResource
**printTicketResource
415 HRESULT CreateFontResource
(
416 [in] IStream
*acquiredStream
,
417 [in] XPS_FONT_EMBEDDING fontEmbedding
,
418 [in] IOpcPartUri
*partUri
,
419 [in] BOOL isObfSourceStream
,
420 [out, retval] IXpsOMFontResource
**fontResource
423 HRESULT CreateGradientStop
(
424 [in] const XPS_COLOR
*color
,
425 [in] IXpsOMColorProfileResource
*colorProfile
,
427 [out, retval] IXpsOMGradientStop
**gradientStop
430 HRESULT CreateLinearGradientBrush
(
431 [in] IXpsOMGradientStop
*gradStop1
,
432 [in] IXpsOMGradientStop
*gradStop2
,
433 [in] const XPS_POINT
*startPoint
,
434 [in] const XPS_POINT
*endPoint,
435 [out, retval] IXpsOMLinearGradientBrush
**linearGradientBrush
438 HRESULT CreateRadialGradientBrush
440 [in] IXpsOMGradientStop
*gradStop1
,
441 [in] IXpsOMGradientStop
*gradStop2
,
442 [in] const XPS_POINT
*centerPoint
,
443 [in] const XPS_POINT
*gradientOrigin
,
444 [in] const XPS_SIZE
*radiiSizes
,
445 [out, retval] IXpsOMRadialGradientBrush
**radialGradientBrush
448 HRESULT CreateCoreProperties
(
449 [in] IOpcPartUri
*partUri
,
450 [out, retval] IXpsOMCoreProperties
**coreProperties
453 HRESULT CreateDictionary
(
454 [out, retval] IXpsOMDictionary
**dictionary
457 HRESULT CreatePartUriCollection
(
458 [out, retval] IXpsOMPartUriCollection
**partUriCollection
461 HRESULT CreatePackageWriterOnFile
(
462 [in, string] LPCWSTR fileName
,
463 [in, unique] LPSECURITY_ATTRIBUTES securityAttributes
,
464 [in] DWORD flagsAndAttributes
,
465 [in] BOOL optimizeMarkupSize
,
466 [in] XPS_INTERLEAVING interleaving
,
467 [in] IOpcPartUri
*documentSequencePartName
,
468 [in] IXpsOMCoreProperties
*coreProperties
,
469 [in] IXpsOMImageResource
*packageThumbnail
,
470 [in] IXpsOMPrintTicketResource
*documentSequencePrintTicket
,
471 [in] IOpcPartUri
*discardControlPartName
,
472 [out, retval] IXpsOMPackageWriter
**packageWriter
475 HRESULT CreatePackageWriterOnStream
477 [in] ISequentialStream
*outputStream
,
478 [in] BOOL optimizeMarkupSize
,
479 [in] XPS_INTERLEAVING interleaving
,
480 [in] IOpcPartUri
*documentSequencePartName
,
481 [in] IXpsOMCoreProperties
*coreProperties
,
482 [in] IXpsOMImageResource
*packageThumbnail
,
483 [in] IXpsOMPrintTicketResource
*documentSequencePrintTicket
,
484 [in] IOpcPartUri
*discardControlPartName
,
485 [out, retval] IXpsOMPackageWriter
**packageWriter
488 HRESULT CreatePartUri
(
489 [in, string] LPCWSTR uri
,
490 [out, retval] IOpcPartUri
**partUri
493 HRESULT CreateReadOnlyStreamOnFile
(
494 [in, string] LPCWSTR filename
,
495 [out, retval] IStream
**stream
501 uuid(4e2aa182
-a443
-42c6
-b41b
-4f8e9de73ff9
)
503 interface IXpsOMPackageWriter
: IUnknown
505 HRESULT StartNewDocument
(
506 [in] IOpcPartUri
*documentPartName
,
507 [in] IXpsOMPrintTicketResource
*documentPrintTicket
,
508 [in] IXpsOMDocumentStructureResource
*documentStructure
,
509 [in] IXpsOMSignatureBlockResourceCollection
*signatureBlockResources
,
510 [in] IXpsOMPartUriCollection
*restrictedFonts
514 [in] IXpsOMPage
*page
,
515 [in] const XPS_SIZE
*advisoryPageDimensions
,
516 [in] IXpsOMPartUriCollection
*discardableResourceParts
,
517 [in] IXpsOMStoryFragmentsResource
*storyFragments
,
518 [in] IXpsOMPrintTicketResource
*pagePrintTicket
,
519 [in] IXpsOMImageResource
*pageThumbnail
523 [in] IXpsOMResource
*resource
529 [out, retval] BOOL
*isClosed
534 uuid(b47491a0
-cf33
-4fe4
-9a48
-b0acdae207e8
)
539 uuid(e974d26d
-3d9b
-4d47
-88cc
-3872f2dc3585
)
541 coclass XpsOMObjectFactory
543 interface IXpsOMObjectFactory
;