1 #![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
2 pub const ID_DOCUMENTPACKAGETARGET_MSXPS: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2628665512, 57041, 16841, [169, 253, 215, 53, 239, 51, 174, 218]);
3 pub const ID_DOCUMENTPACKAGETARGET_OPENXPS: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(5684082, 35996, 17938, [189, 15, 147, 1, 42, 135, 9, 157]);
4 pub const ID_DOCUMENTPACKAGETARGET_OPENXPS_WITH_3D: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1675351840, 35604, 17783, [176, 116, 123, 177, 27, 89, 109, 40]);
5 #[repr(transparent)]
6 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
7 pub struct IPrintDocumentPackageStatusEvent(::windows::runtime::IUnknown);
8 impl IPrintDocumentPackageStatusEvent {
9 pub unsafe fn PackageStatusUpdated(&self, packagestatus: *const PrintDocumentPackageStatus) -> ::windows::runtime::Result<()> {
10 (::windows::runtime::Interface::vtable(self).7)(::std::mem::transmute_copy(self), ::std::mem::transmute(packagestatus)).ok()
11 }
12 }
13 unsafe impl ::windows::runtime::Interface for IPrintDocumentPackageStatusEvent {
14 type Vtable = IPrintDocumentPackageStatusEvent_abi;
15 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3985688749, 23604, 19717, [161, 236, 14, 138, 155, 58, 215, 175]);
16 }
17 impl ::std::convert::From<IPrintDocumentPackageStatusEvent> for ::windows::runtime::IUnknown {
18 fn from(value: IPrintDocumentPackageStatusEvent) -> Self {
19 unsafe { ::std::mem::transmute(value) }
20 }
21 }
22 impl ::std::convert::From<&IPrintDocumentPackageStatusEvent> for ::windows::runtime::IUnknown {
test(Container & c,KeyTypeIter first,KeyTypeIter last)23 fn from(value: &IPrintDocumentPackageStatusEvent) -> Self {
24 ::std::convert::From::from(::std::clone::Clone::clone(value))
25 }
26 }
27 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IPrintDocumentPackageStatusEvent {
28 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
29 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
30 }
31 }
32 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IPrintDocumentPackageStatusEvent {
33 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
34 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
35 }
36 }
37 #[cfg(feature = "Win32_System_Ole_Automation")]
38 impl ::std::convert::From<IPrintDocumentPackageStatusEvent> for super::super::super::System::Ole::Automation::IDispatch {
39 fn from(value: IPrintDocumentPackageStatusEvent) -> Self {
40 unsafe { ::std::mem::transmute(value) }
41 }
42 }
43 #[cfg(feature = "Win32_System_Ole_Automation")]
44 impl ::std::convert::From<&IPrintDocumentPackageStatusEvent> for super::super::super::System::Ole::Automation::IDispatch {
45 fn from(value: &IPrintDocumentPackageStatusEvent) -> Self {
46 ::std::convert::From::from(::std::clone::Clone::clone(value))
47 }
48 }
main(int,char **)49 #[cfg(feature = "Win32_System_Ole_Automation")]
50 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::System::Ole::Automation::IDispatch> for IPrintDocumentPackageStatusEvent {
51 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::System::Ole::Automation::IDispatch> {
52 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::System::Ole::Automation::IDispatch>::into(self))
53 }
54 }
55 #[cfg(feature = "Win32_System_Ole_Automation")]
56 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::System::Ole::Automation::IDispatch> for &IPrintDocumentPackageStatusEvent {
57 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::System::Ole::Automation::IDispatch> {
58 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::System::Ole::Automation::IDispatch>::into(::std::clone::Clone::clone(self)))
59 }
60 }
61 #[repr(C)]
62 #[doc(hidden)]
63 pub struct IPrintDocumentPackageStatusEvent_abi(
64 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
65 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
66 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
67 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, pctinfo: *mut u32) -> ::windows::runtime::HRESULT,
68 #[cfg(feature = "Win32_System_Ole_Automation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, itinfo: u32, lcid: u32, pptinfo: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
69 #[cfg(not(feature = "Win32_System_Ole_Automation"))] usize,
70 #[cfg(feature = "Win32_Foundation")] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, riid: *const ::windows::runtime::GUID, rgsznames: *const super::super::super::Foundation::PWSTR, cnames: u32, lcid: u32, rgdispid: *mut i32) -> ::windows::runtime::HRESULT,
71 #[cfg(not(feature = "Win32_Foundation"))] usize,
72 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole_Automation"))]
73 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, dispidmember: i32, riid: *const ::windows::runtime::GUID, lcid: u32, wflags: u16, pdispparams: *const super::super::super::System::Ole::Automation::DISPPARAMS, pvarresult: *mut ::std::mem::ManuallyDrop<super::super::super::System::Com::VARIANT>, pexcepinfo: *mut ::std::mem::ManuallyDrop<super::super::super::System::Ole::Automation::EXCEPINFO>, puargerr: *mut u32) -> ::windows::runtime::HRESULT,
74 #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole_Automation")))] usize,
75 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, packagestatus: *const PrintDocumentPackageStatus) -> ::windows::runtime::HRESULT,
76 );
77 #[repr(transparent)]
78 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
79 pub struct IPrintDocumentPackageTarget(::windows::runtime::IUnknown);
80 impl IPrintDocumentPackageTarget {
81 pub unsafe fn GetPackageTargetTypes(&self, targetcount: *mut u32, targettypes: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::Result<()> {
82 (::windows::runtime::Interface::vtable(self).3)(::std::mem::transmute_copy(self), ::std::mem::transmute(targetcount), ::std::mem::transmute(targettypes)).ok()
83 }
84 pub unsafe fn GetPackageTarget<T: ::windows::runtime::Interface>(&self, guidtargettype: *const ::windows::runtime::GUID) -> ::windows::runtime::Result<T> {
85 let mut result__ = ::std::option::Option::None;
86 (::windows::runtime::Interface::vtable(self).4)(::std::mem::transmute_copy(self), ::std::mem::transmute(guidtargettype), &<T as ::windows::runtime::Interface>::IID, &mut result__ as *mut _ as *mut _).and_some(result__)
87 }
88 pub unsafe fn Cancel(&self) -> ::windows::runtime::Result<()> {
89 (::windows::runtime::Interface::vtable(self).5)(::std::mem::transmute_copy(self)).ok()
90 }
91 }
92 unsafe impl ::windows::runtime::Interface for IPrintDocumentPackageTarget {
93 type Vtable = IPrintDocumentPackageTarget_abi;
94 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(462356164, 12313, 19495, [150, 78, 54, 114, 2, 21, 105, 6]);
95 }
96 impl ::std::convert::From<IPrintDocumentPackageTarget> for ::windows::runtime::IUnknown {
97 fn from(value: IPrintDocumentPackageTarget) -> Self {
98 unsafe { ::std::mem::transmute(value) }
99 }
100 }
101 impl ::std::convert::From<&IPrintDocumentPackageTarget> for ::windows::runtime::IUnknown {
102 fn from(value: &IPrintDocumentPackageTarget) -> Self {
103 ::std::convert::From::from(::std::clone::Clone::clone(value))
104 }
105 }
106 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IPrintDocumentPackageTarget {
107 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
108 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
109 }
110 }
111 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IPrintDocumentPackageTarget {
112 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
113 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
114 }
115 }
116 #[repr(C)]
117 #[doc(hidden)]
118 pub struct IPrintDocumentPackageTarget_abi(
119 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
120 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
121 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
122 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, targetcount: *mut u32, targettypes: *mut *mut ::windows::runtime::GUID) -> ::windows::runtime::HRESULT,
123 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, guidtargettype: *const ::windows::runtime::GUID, riid: *const ::windows::runtime::GUID, ppvtarget: *mut *mut ::std::ffi::c_void) -> ::windows::runtime::HRESULT,
124 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
125 );
126 #[repr(transparent)]
127 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
128 pub struct IPrintDocumentPackageTargetFactory(::windows::runtime::IUnknown);
129 impl IPrintDocumentPackageTargetFactory {
130 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))]
131 pub unsafe fn CreateDocumentPackageTargetForPrintJob<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::runtime::IntoParam<'a, super::super::super::System::Com::IStream>, Param3: ::windows::runtime::IntoParam<'a, super::super::super::System::Com::IStream>>(
132 &self,
133 printername: Param0,
134 jobname: Param1,
135 joboutputstream: Param2,
136 jobprintticketstream: Param3,
137 ) -> ::windows::runtime::Result<IPrintDocumentPackageTarget> {
138 let mut result__: <IPrintDocumentPackageTarget as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
139 (::windows::runtime::Interface::vtable(self).3)(::std::mem::transmute_copy(self), printername.into_param().abi(), jobname.into_param().abi(), joboutputstream.into_param().abi(), jobprintticketstream.into_param().abi(), &mut result__).from_abi::<IPrintDocumentPackageTarget>(result__)
140 }
141 }
142 unsafe impl ::windows::runtime::Interface for IPrintDocumentPackageTargetFactory {
143 type Vtable = IPrintDocumentPackageTargetFactory_abi;
144 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(3533020151, 45851, 19005, [150, 0, 113, 46, 177, 51, 91, 164]);
145 }
146 impl ::std::convert::From<IPrintDocumentPackageTargetFactory> for ::windows::runtime::IUnknown {
147 fn from(value: IPrintDocumentPackageTargetFactory) -> Self {
148 unsafe { ::std::mem::transmute(value) }
149 }
150 }
151 impl ::std::convert::From<&IPrintDocumentPackageTargetFactory> for ::windows::runtime::IUnknown {
152 fn from(value: &IPrintDocumentPackageTargetFactory) -> Self {
153 ::std::convert::From::from(::std::clone::Clone::clone(value))
154 }
155 }
156 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IPrintDocumentPackageTargetFactory {
157 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
158 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
159 }
160 }
161 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IPrintDocumentPackageTargetFactory {
162 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
163 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
164 }
165 }
166 #[repr(C)]
167 #[doc(hidden)]
168 pub struct IPrintDocumentPackageTargetFactory_abi(
169 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
170 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
171 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
172 #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, printername: super::super::super::Foundation::PWSTR, jobname: super::super::super::Foundation::PWSTR, joboutputstream: ::windows::runtime::RawPtr, jobprintticketstream: ::windows::runtime::RawPtr, docpackagetarget: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
173 #[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_System_Com")))] usize,
174 );
175 #[repr(transparent)]
176 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
177 pub struct IXpsPrintJob(::windows::runtime::IUnknown);
178 impl IXpsPrintJob {
179 pub unsafe fn Cancel(&self) -> ::windows::runtime::Result<()> {
180 (::windows::runtime::Interface::vtable(self).3)(::std::mem::transmute_copy(self)).ok()
181 }
182 pub unsafe fn GetJobStatus(&self) -> ::windows::runtime::Result<XPS_JOB_STATUS> {
183 let mut result__: <XPS_JOB_STATUS as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
184 (::windows::runtime::Interface::vtable(self).4)(::std::mem::transmute_copy(self), &mut result__).from_abi::<XPS_JOB_STATUS>(result__)
185 }
186 }
187 unsafe impl ::windows::runtime::Interface for IXpsPrintJob {
188 type Vtable = IXpsPrintJob_abi;
189 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1522047750, 33172, 16991, [171, 59, 215, 169, 110, 53, 1, 97]);
190 }
191 impl ::std::convert::From<IXpsPrintJob> for ::windows::runtime::IUnknown {
192 fn from(value: IXpsPrintJob) -> Self {
193 unsafe { ::std::mem::transmute(value) }
194 }
195 }
196 impl ::std::convert::From<&IXpsPrintJob> for ::windows::runtime::IUnknown {
197 fn from(value: &IXpsPrintJob) -> Self {
198 ::std::convert::From::from(::std::clone::Clone::clone(value))
199 }
200 }
201 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IXpsPrintJob {
202 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
203 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
204 }
205 }
206 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IXpsPrintJob {
207 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
208 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
209 }
210 }
211 #[repr(C)]
212 #[doc(hidden)]
213 pub struct IXpsPrintJob_abi(
214 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
215 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
216 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
217 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
218 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, jobstatus: *mut XPS_JOB_STATUS) -> ::windows::runtime::HRESULT,
219 );
220 #[repr(transparent)]
221 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: clone :: Clone, :: std :: fmt :: Debug)]
222 pub struct IXpsPrintJobStream(::windows::runtime::IUnknown);
223 impl IXpsPrintJobStream {
224 pub unsafe fn Read(&self, pv: *mut ::std::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::runtime::Result<()> {
225 (::windows::runtime::Interface::vtable(self).3)(::std::mem::transmute_copy(self), ::std::mem::transmute(pv), ::std::mem::transmute(cb), ::std::mem::transmute(pcbread)).ok()
226 }
227 pub unsafe fn Write(&self, pv: *const ::std::ffi::c_void, cb: u32) -> ::windows::runtime::Result<u32> {
228 let mut result__: <u32 as ::windows::runtime::Abi>::Abi = ::std::mem::zeroed();
229 (::windows::runtime::Interface::vtable(self).4)(::std::mem::transmute_copy(self), ::std::mem::transmute(pv), ::std::mem::transmute(cb), &mut result__).from_abi::<u32>(result__)
230 }
231 pub unsafe fn Close(&self) -> ::windows::runtime::Result<()> {
232 (::windows::runtime::Interface::vtable(self).5)(::std::mem::transmute_copy(self)).ok()
233 }
234 }
235 unsafe impl ::windows::runtime::Interface for IXpsPrintJobStream {
236 type Vtable = IXpsPrintJobStream_abi;
237 const IID: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(2054675551, 17878, 19967, [147, 7, 216, 203, 132, 99, 71, 202]);
238 }
239 impl ::std::convert::From<IXpsPrintJobStream> for ::windows::runtime::IUnknown {
240 fn from(value: IXpsPrintJobStream) -> Self {
241 unsafe { ::std::mem::transmute(value) }
242 }
243 }
244 impl ::std::convert::From<&IXpsPrintJobStream> for ::windows::runtime::IUnknown {
245 fn from(value: &IXpsPrintJobStream) -> Self {
246 ::std::convert::From::from(::std::clone::Clone::clone(value))
247 }
248 }
249 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for IXpsPrintJobStream {
250 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
251 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(self))
252 }
253 }
254 impl<'a> ::windows::runtime::IntoParam<'a, ::windows::runtime::IUnknown> for &IXpsPrintJobStream {
255 fn into_param(self) -> ::windows::runtime::Param<'a, ::windows::runtime::IUnknown> {
256 ::windows::runtime::Param::Owned(::std::convert::Into::<::windows::runtime::IUnknown>::into(::std::clone::Clone::clone(self)))
257 }
258 }
259 #[cfg(feature = "Win32_System_Com")]
260 impl ::std::convert::From<IXpsPrintJobStream> for super::super::super::System::Com::ISequentialStream {
261 fn from(value: IXpsPrintJobStream) -> Self {
262 unsafe { ::std::mem::transmute(value) }
263 }
264 }
265 #[cfg(feature = "Win32_System_Com")]
266 impl ::std::convert::From<&IXpsPrintJobStream> for super::super::super::System::Com::ISequentialStream {
267 fn from(value: &IXpsPrintJobStream) -> Self {
268 ::std::convert::From::from(::std::clone::Clone::clone(value))
269 }
270 }
271 #[cfg(feature = "Win32_System_Com")]
272 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::System::Com::ISequentialStream> for IXpsPrintJobStream {
273 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::System::Com::ISequentialStream> {
274 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::System::Com::ISequentialStream>::into(self))
275 }
276 }
277 #[cfg(feature = "Win32_System_Com")]
278 impl<'a> ::windows::runtime::IntoParam<'a, super::super::super::System::Com::ISequentialStream> for &IXpsPrintJobStream {
279 fn into_param(self) -> ::windows::runtime::Param<'a, super::super::super::System::Com::ISequentialStream> {
280 ::windows::runtime::Param::Owned(::std::convert::Into::<super::super::super::System::Com::ISequentialStream>::into(::std::clone::Clone::clone(self)))
281 }
282 }
283 #[repr(C)]
284 #[doc(hidden)]
285 pub struct IXpsPrintJobStream_abi(
286 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, iid: &::windows::runtime::GUID, interface: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
287 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
288 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> u32,
289 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, pv: *mut ::std::ffi::c_void, cb: u32, pcbread: *mut u32) -> ::windows::runtime::HRESULT,
290 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr, pv: *const ::std::ffi::c_void, cb: u32, pcbwritten: *mut u32) -> ::windows::runtime::HRESULT,
291 pub unsafe extern "system" fn(this: ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT,
292 );
293 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
294 #[repr(transparent)]
295 pub struct PrintDocumentPackageCompletion(pub i32);
296 pub const PrintDocumentPackageCompletion_InProgress: PrintDocumentPackageCompletion = PrintDocumentPackageCompletion(0i32);
297 pub const PrintDocumentPackageCompletion_Completed: PrintDocumentPackageCompletion = PrintDocumentPackageCompletion(1i32);
298 pub const PrintDocumentPackageCompletion_Canceled: PrintDocumentPackageCompletion = PrintDocumentPackageCompletion(2i32);
299 pub const PrintDocumentPackageCompletion_Failed: PrintDocumentPackageCompletion = PrintDocumentPackageCompletion(3i32);
300 impl ::std::convert::From<i32> for PrintDocumentPackageCompletion {
301 fn from(value: i32) -> Self {
302 Self(value)
303 }
304 }
305 unsafe impl ::windows::runtime::Abi for PrintDocumentPackageCompletion {
306 type Abi = Self;
307 type DefaultType = Self;
308 }
309 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
310 #[repr(C)]
311 pub struct PrintDocumentPackageStatus {
312 pub JobId: u32,
313 pub CurrentDocument: i32,
314 pub CurrentPage: i32,
315 pub CurrentPageTotal: i32,
316 pub Completion: PrintDocumentPackageCompletion,
317 pub PackageStatus: ::windows::runtime::HRESULT,
318 }
319 impl PrintDocumentPackageStatus {}
320 impl ::std::default::Default for PrintDocumentPackageStatus {
321 fn default() -> Self {
322 unsafe { ::std::mem::zeroed() }
323 }
324 }
325 impl ::std::fmt::Debug for PrintDocumentPackageStatus {
326 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
327 fmt.debug_struct("PrintDocumentPackageStatus")
328 .field("JobId", &self.JobId)
329 .field("CurrentDocument", &self.CurrentDocument)
330 .field("CurrentPage", &self.CurrentPage)
331 .field("CurrentPageTotal", &self.CurrentPageTotal)
332 .field("Completion", &self.Completion)
333 .field("PackageStatus", &self.PackageStatus)
334 .finish()
335 }
336 }
337 impl ::std::cmp::PartialEq for PrintDocumentPackageStatus {
338 fn eq(&self, other: &Self) -> bool {
339 self.JobId == other.JobId && self.CurrentDocument == other.CurrentDocument && self.CurrentPage == other.CurrentPage && self.CurrentPageTotal == other.CurrentPageTotal && self.Completion == other.Completion && self.PackageStatus == other.PackageStatus
340 }
341 }
342 impl ::std::cmp::Eq for PrintDocumentPackageStatus {}
343 unsafe impl ::windows::runtime::Abi for PrintDocumentPackageStatus {
344 type Abi = Self;
345 type DefaultType = Self;
346 }
347 pub const PrintDocumentPackageTarget: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(1212311198, 39239, 18154, [139, 162, 216, 204, 228, 50, 194, 202]);
348 pub const PrintDocumentPackageTargetFactory: ::windows::runtime::GUID = ::windows::runtime::GUID::from_values(881783165, 27777, 18818, [146, 180, 238, 24, 138, 67, 134, 122]);
349 #[cfg(feature = "Win32_Foundation")]
350 #[inline]
351 pub unsafe fn StartXpsPrintJob<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::HANDLE>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::HANDLE>>(
352 printername: Param0,
353 jobname: Param1,
354 outputfilename: Param2,
355 progressevent: Param3,
356 completionevent: Param4,
357 printablepageson: *const u8,
358 printablepagesoncount: u32,
359 xpsprintjob: *mut ::std::option::Option<IXpsPrintJob>,
360 documentstream: *mut ::std::option::Option<IXpsPrintJobStream>,
361 printticketstream: *mut ::std::option::Option<IXpsPrintJobStream>,
362 ) -> ::windows::runtime::Result<()> {
363 #[cfg(windows)]
364 {
365 #[link(name = "windows")]
366 extern "system" {
367 fn StartXpsPrintJob(
368 printername: super::super::super::Foundation::PWSTR,
369 jobname: super::super::super::Foundation::PWSTR,
370 outputfilename: super::super::super::Foundation::PWSTR,
371 progressevent: super::super::super::Foundation::HANDLE,
372 completionevent: super::super::super::Foundation::HANDLE,
373 printablepageson: *const u8,
374 printablepagesoncount: u32,
375 xpsprintjob: *mut ::windows::runtime::RawPtr,
376 documentstream: *mut ::windows::runtime::RawPtr,
377 printticketstream: *mut ::windows::runtime::RawPtr,
378 ) -> ::windows::runtime::HRESULT;
379 }
380 StartXpsPrintJob(
381 printername.into_param().abi(),
382 jobname.into_param().abi(),
383 outputfilename.into_param().abi(),
384 progressevent.into_param().abi(),
385 completionevent.into_param().abi(),
386 ::std::mem::transmute(printablepageson),
387 ::std::mem::transmute(printablepagesoncount),
388 ::std::mem::transmute(xpsprintjob),
389 ::std::mem::transmute(documentstream),
390 ::std::mem::transmute(printticketstream),
391 )
392 .ok()
393 }
394 #[cfg(not(windows))]
395 unimplemented!("Unsupported target OS");
396 }
397 #[cfg(feature = "Win32_Foundation")]
398 #[inline]
399 pub unsafe fn StartXpsPrintJob1<'a, Param0: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param1: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param2: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::PWSTR>, Param3: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::HANDLE>, Param4: ::windows::runtime::IntoParam<'a, super::super::super::Foundation::HANDLE>>(
400 printername: Param0,
401 jobname: Param1,
402 outputfilename: Param2,
403 progressevent: Param3,
404 completionevent: Param4,
405 xpsprintjob: *mut ::std::option::Option<IXpsPrintJob>,
406 printcontentreceiver: *mut ::std::option::Option<super::IXpsOMPackageTarget>,
407 ) -> ::windows::runtime::Result<()> {
408 #[cfg(windows)]
409 {
410 #[link(name = "windows")]
411 extern "system" {
412 fn StartXpsPrintJob1(printername: super::super::super::Foundation::PWSTR, jobname: super::super::super::Foundation::PWSTR, outputfilename: super::super::super::Foundation::PWSTR, progressevent: super::super::super::Foundation::HANDLE, completionevent: super::super::super::Foundation::HANDLE, xpsprintjob: *mut ::windows::runtime::RawPtr, printcontentreceiver: *mut ::windows::runtime::RawPtr) -> ::windows::runtime::HRESULT;
413 }
414 StartXpsPrintJob1(printername.into_param().abi(), jobname.into_param().abi(), outputfilename.into_param().abi(), progressevent.into_param().abi(), completionevent.into_param().abi(), ::std::mem::transmute(xpsprintjob), ::std::mem::transmute(printcontentreceiver)).ok()
415 }
416 #[cfg(not(windows))]
417 unimplemented!("Unsupported target OS");
418 }
419 #[derive(:: std :: cmp :: PartialEq, :: std :: cmp :: Eq, :: std :: marker :: Copy, :: std :: clone :: Clone, :: std :: default :: Default, :: std :: fmt :: Debug)]
420 #[repr(transparent)]
421 pub struct XPS_JOB_COMPLETION(pub i32);
422 pub const XPS_JOB_IN_PROGRESS: XPS_JOB_COMPLETION = XPS_JOB_COMPLETION(0i32);
423 pub const XPS_JOB_COMPLETED: XPS_JOB_COMPLETION = XPS_JOB_COMPLETION(1i32);
424 pub const XPS_JOB_CANCELLED: XPS_JOB_COMPLETION = XPS_JOB_COMPLETION(2i32);
425 pub const XPS_JOB_FAILED: XPS_JOB_COMPLETION = XPS_JOB_COMPLETION(3i32);
426 impl ::std::convert::From<i32> for XPS_JOB_COMPLETION {
427 fn from(value: i32) -> Self {
428 Self(value)
429 }
430 }
431 unsafe impl ::windows::runtime::Abi for XPS_JOB_COMPLETION {
432 type Abi = Self;
433 type DefaultType = Self;
434 }
435 #[derive(:: std :: clone :: Clone, :: std :: marker :: Copy)]
436 #[repr(C)]
437 pub struct XPS_JOB_STATUS {
438 pub jobId: u32,
439 pub currentDocument: i32,
440 pub currentPage: i32,
441 pub currentPageTotal: i32,
442 pub completion: XPS_JOB_COMPLETION,
443 pub jobStatus: ::windows::runtime::HRESULT,
444 }
445 impl XPS_JOB_STATUS {}
446 impl ::std::default::Default for XPS_JOB_STATUS {
447 fn default() -> Self {
448 unsafe { ::std::mem::zeroed() }
449 }
450 }
451 impl ::std::fmt::Debug for XPS_JOB_STATUS {
452 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
453 fmt.debug_struct("XPS_JOB_STATUS").field("jobId", &self.jobId).field("currentDocument", &self.currentDocument).field("currentPage", &self.currentPage).field("currentPageTotal", &self.currentPageTotal).field("completion", &self.completion).field("jobStatus", &self.jobStatus).finish()
454 }
455 }
456 impl ::std::cmp::PartialEq for XPS_JOB_STATUS {
457 fn eq(&self, other: &Self) -> bool {
458 self.jobId == other.jobId && self.currentDocument == other.currentDocument && self.currentPage == other.currentPage && self.currentPageTotal == other.currentPageTotal && self.completion == other.completion && self.jobStatus == other.jobStatus
459 }
460 }
461 impl ::std::cmp::Eq for XPS_JOB_STATUS {}
462 unsafe impl ::windows::runtime::Abi for XPS_JOB_STATUS {
463 type Abi = Self;
464 type DefaultType = Self;
465 }
466