/
mod.rs
1209 lines (1209 loc) · 59 KB
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IDesktopWindowXamlSourceNative(::windows::core::IUnknown);
impl IDesktopWindowXamlSourceNative {
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn AttachToWindow<'a, P0>(&self, parentwnd: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<super::super::super::Foundation::HWND>,
{
(::windows::core::Interface::vtable(self).AttachToWindow)(::windows::core::Interface::as_raw(self), parentwnd.into()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn WindowHandle(&self) -> ::windows::core::Result<super::super::super::Foundation::HWND> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Interface::vtable(self).WindowHandle)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(result__.as_mut_ptr())).from_abi::<super::super::super::Foundation::HWND>(result__)
}
}
impl ::core::convert::From<IDesktopWindowXamlSourceNative> for ::windows::core::IUnknown {
fn from(value: IDesktopWindowXamlSourceNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IDesktopWindowXamlSourceNative> for &'a ::windows::core::IUnknown {
fn from(value: &'a IDesktopWindowXamlSourceNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IDesktopWindowXamlSourceNative> for ::windows::core::IUnknown {
fn from(value: &IDesktopWindowXamlSourceNative) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IDesktopWindowXamlSourceNative {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IDesktopWindowXamlSourceNative {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IDesktopWindowXamlSourceNative {}
impl ::core::fmt::Debug for IDesktopWindowXamlSourceNative {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IDesktopWindowXamlSourceNative").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IDesktopWindowXamlSourceNative {
type Vtable = IDesktopWindowXamlSourceNative_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3cbcf1bf_2f76_4e9c_96ab_e84b37972554);
}
#[repr(C)]
#[doc(hidden)]
pub struct IDesktopWindowXamlSourceNative_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
#[cfg(feature = "Win32_Foundation")]
pub AttachToWindow: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, parentwnd: super::super::super::Foundation::HWND) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))]
AttachToWindow: usize,
#[cfg(feature = "Win32_Foundation")]
pub WindowHandle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, hwnd: *mut super::super::super::Foundation::HWND) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))]
WindowHandle: usize,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IDesktopWindowXamlSourceNative2(::windows::core::IUnknown);
impl IDesktopWindowXamlSourceNative2 {
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn AttachToWindow<'a, P0>(&self, parentwnd: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<super::super::super::Foundation::HWND>,
{
(::windows::core::Interface::vtable(self).base__.AttachToWindow)(::windows::core::Interface::as_raw(self), parentwnd.into()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn WindowHandle(&self) -> ::windows::core::Result<super::super::super::Foundation::HWND> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Interface::vtable(self).base__.WindowHandle)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(result__.as_mut_ptr())).from_abi::<super::super::super::Foundation::HWND>(result__)
}
#[doc = "*Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
pub unsafe fn PreTranslateMessage(&self, message: &super::super::super::UI::WindowsAndMessaging::MSG, result: &mut super::super::super::Foundation::BOOL) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).PreTranslateMessage)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(message), ::core::mem::transmute(result)).ok()
}
}
impl ::core::convert::From<IDesktopWindowXamlSourceNative2> for ::windows::core::IUnknown {
fn from(value: IDesktopWindowXamlSourceNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IDesktopWindowXamlSourceNative2> for &'a ::windows::core::IUnknown {
fn from(value: &'a IDesktopWindowXamlSourceNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IDesktopWindowXamlSourceNative2> for ::windows::core::IUnknown {
fn from(value: &IDesktopWindowXamlSourceNative2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::convert::From<IDesktopWindowXamlSourceNative2> for IDesktopWindowXamlSourceNative {
fn from(value: IDesktopWindowXamlSourceNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IDesktopWindowXamlSourceNative2> for &'a IDesktopWindowXamlSourceNative {
fn from(value: &'a IDesktopWindowXamlSourceNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IDesktopWindowXamlSourceNative2> for IDesktopWindowXamlSourceNative {
fn from(value: &IDesktopWindowXamlSourceNative2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IDesktopWindowXamlSourceNative2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IDesktopWindowXamlSourceNative2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IDesktopWindowXamlSourceNative2 {}
impl ::core::fmt::Debug for IDesktopWindowXamlSourceNative2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IDesktopWindowXamlSourceNative2").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IDesktopWindowXamlSourceNative2 {
type Vtable = IDesktopWindowXamlSourceNative2_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xe3dcd8c7_3057_4692_99c3_7b7720afda31);
}
#[repr(C)]
#[doc(hidden)]
pub struct IDesktopWindowXamlSourceNative2_Vtbl {
pub base__: IDesktopWindowXamlSourceNative_Vtbl,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))]
pub PreTranslateMessage: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, message: *const super::super::super::UI::WindowsAndMessaging::MSG, result: *mut super::super::super::Foundation::BOOL) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging")))]
PreTranslateMessage: usize,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IFindReferenceTargetsCallback(::windows::core::IUnknown);
impl IFindReferenceTargetsCallback {
pub unsafe fn FoundTrackerTarget<'a, P0>(&self, target: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, IReferenceTrackerTarget>>,
{
(::windows::core::Interface::vtable(self).FoundTrackerTarget)(::windows::core::Interface::as_raw(self), target.into().abi()).ok()
}
}
impl ::core::convert::From<IFindReferenceTargetsCallback> for ::windows::core::IUnknown {
fn from(value: IFindReferenceTargetsCallback) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IFindReferenceTargetsCallback> for &'a ::windows::core::IUnknown {
fn from(value: &'a IFindReferenceTargetsCallback) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IFindReferenceTargetsCallback> for ::windows::core::IUnknown {
fn from(value: &IFindReferenceTargetsCallback) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IFindReferenceTargetsCallback {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IFindReferenceTargetsCallback {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IFindReferenceTargetsCallback {}
impl ::core::fmt::Debug for IFindReferenceTargetsCallback {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IFindReferenceTargetsCallback").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IFindReferenceTargetsCallback {
type Vtable = IFindReferenceTargetsCallback_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x04b3486c_4687_4229_8d14_505ab584dd88);
}
#[repr(C)]
#[doc(hidden)]
pub struct IFindReferenceTargetsCallback_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub FoundTrackerTarget: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, target: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IReferenceTracker(::windows::core::IUnknown);
impl IReferenceTracker {
pub unsafe fn ConnectFromTrackerSource(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ConnectFromTrackerSource)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn DisconnectFromTrackerSource(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).DisconnectFromTrackerSource)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn FindTrackerTargets<'a, P0>(&self, callback: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, IFindReferenceTargetsCallback>>,
{
(::windows::core::Interface::vtable(self).FindTrackerTargets)(::windows::core::Interface::as_raw(self), callback.into().abi()).ok()
}
pub unsafe fn GetReferenceTrackerManager(&self) -> ::windows::core::Result<IReferenceTrackerManager> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Interface::vtable(self).GetReferenceTrackerManager)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(result__.as_mut_ptr())).from_abi::<IReferenceTrackerManager>(result__)
}
pub unsafe fn AddRefFromTrackerSource(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).AddRefFromTrackerSource)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn ReleaseFromTrackerSource(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ReleaseFromTrackerSource)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn PegFromTrackerSource(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).PegFromTrackerSource)(::windows::core::Interface::as_raw(self)).ok()
}
}
impl ::core::convert::From<IReferenceTracker> for ::windows::core::IUnknown {
fn from(value: IReferenceTracker) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IReferenceTracker> for &'a ::windows::core::IUnknown {
fn from(value: &'a IReferenceTracker) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IReferenceTracker> for ::windows::core::IUnknown {
fn from(value: &IReferenceTracker) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IReferenceTracker {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IReferenceTracker {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IReferenceTracker {}
impl ::core::fmt::Debug for IReferenceTracker {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IReferenceTracker").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IReferenceTracker {
type Vtable = IReferenceTracker_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x11d3b13a_180e_4789_a8be_7712882893e6);
}
#[repr(C)]
#[doc(hidden)]
pub struct IReferenceTracker_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub ConnectFromTrackerSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub DisconnectFromTrackerSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub FindTrackerTargets: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, callback: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub GetReferenceTrackerManager: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub AddRefFromTrackerSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub ReleaseFromTrackerSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub PegFromTrackerSource: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IReferenceTrackerExtension(::windows::core::IUnknown);
impl IReferenceTrackerExtension {}
impl ::core::convert::From<IReferenceTrackerExtension> for ::windows::core::IUnknown {
fn from(value: IReferenceTrackerExtension) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IReferenceTrackerExtension> for &'a ::windows::core::IUnknown {
fn from(value: &'a IReferenceTrackerExtension) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IReferenceTrackerExtension> for ::windows::core::IUnknown {
fn from(value: &IReferenceTrackerExtension) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IReferenceTrackerExtension {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IReferenceTrackerExtension {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IReferenceTrackerExtension {}
impl ::core::fmt::Debug for IReferenceTrackerExtension {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IReferenceTrackerExtension").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IReferenceTrackerExtension {
type Vtable = IReferenceTrackerExtension_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4e897caa_59d5_4613_8f8c_f7ebd1f399b0);
}
#[repr(C)]
#[doc(hidden)]
pub struct IReferenceTrackerExtension_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IReferenceTrackerHost(::windows::core::IUnknown);
impl IReferenceTrackerHost {
pub unsafe fn DisconnectUnusedReferenceSources(&self, options: XAML_REFERENCETRACKER_DISCONNECT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).DisconnectUnusedReferenceSources)(::windows::core::Interface::as_raw(self), options).ok()
}
pub unsafe fn ReleaseDisconnectedReferenceSources(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ReleaseDisconnectedReferenceSources)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn NotifyEndOfReferenceTrackingOnThread(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).NotifyEndOfReferenceTrackingOnThread)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn GetTrackerTarget<'a, P0>(&self, unknown: P0) -> ::windows::core::Result<IReferenceTrackerTarget>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IUnknown>>,
{
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Interface::vtable(self).GetTrackerTarget)(::windows::core::Interface::as_raw(self), unknown.into().abi(), ::core::mem::transmute(result__.as_mut_ptr())).from_abi::<IReferenceTrackerTarget>(result__)
}
pub unsafe fn AddMemoryPressure(&self, bytesallocated: u64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).AddMemoryPressure)(::windows::core::Interface::as_raw(self), bytesallocated).ok()
}
pub unsafe fn RemoveMemoryPressure(&self, bytesallocated: u64) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).RemoveMemoryPressure)(::windows::core::Interface::as_raw(self), bytesallocated).ok()
}
}
impl ::core::convert::From<IReferenceTrackerHost> for ::windows::core::IUnknown {
fn from(value: IReferenceTrackerHost) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IReferenceTrackerHost> for &'a ::windows::core::IUnknown {
fn from(value: &'a IReferenceTrackerHost) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IReferenceTrackerHost> for ::windows::core::IUnknown {
fn from(value: &IReferenceTrackerHost) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IReferenceTrackerHost {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IReferenceTrackerHost {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IReferenceTrackerHost {}
impl ::core::fmt::Debug for IReferenceTrackerHost {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IReferenceTrackerHost").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IReferenceTrackerHost {
type Vtable = IReferenceTrackerHost_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x29a71c6a_3c42_4416_a39d_e2825a07a773);
}
#[repr(C)]
#[doc(hidden)]
pub struct IReferenceTrackerHost_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub DisconnectUnusedReferenceSources: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, options: XAML_REFERENCETRACKER_DISCONNECT) -> ::windows::core::HRESULT,
pub ReleaseDisconnectedReferenceSources: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub NotifyEndOfReferenceTrackingOnThread: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub GetTrackerTarget: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, unknown: *mut ::core::ffi::c_void, newreference: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub AddMemoryPressure: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, bytesallocated: u64) -> ::windows::core::HRESULT,
pub RemoveMemoryPressure: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, bytesallocated: u64) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IReferenceTrackerManager(::windows::core::IUnknown);
impl IReferenceTrackerManager {
pub unsafe fn ReferenceTrackingStarted(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ReferenceTrackingStarted)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn FindTrackerTargetsCompleted(&self, findfailed: u8) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).FindTrackerTargetsCompleted)(::windows::core::Interface::as_raw(self), findfailed).ok()
}
pub unsafe fn ReferenceTrackingCompleted(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ReferenceTrackingCompleted)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn SetReferenceTrackerHost<'a, P0>(&self, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, IReferenceTrackerHost>>,
{
(::windows::core::Interface::vtable(self).SetReferenceTrackerHost)(::windows::core::Interface::as_raw(self), value.into().abi()).ok()
}
}
impl ::core::convert::From<IReferenceTrackerManager> for ::windows::core::IUnknown {
fn from(value: IReferenceTrackerManager) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IReferenceTrackerManager> for &'a ::windows::core::IUnknown {
fn from(value: &'a IReferenceTrackerManager) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IReferenceTrackerManager> for ::windows::core::IUnknown {
fn from(value: &IReferenceTrackerManager) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IReferenceTrackerManager {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IReferenceTrackerManager {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IReferenceTrackerManager {}
impl ::core::fmt::Debug for IReferenceTrackerManager {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IReferenceTrackerManager").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IReferenceTrackerManager {
type Vtable = IReferenceTrackerManager_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x3cf184b4_7ccb_4dda_8455_7e6ce99a3298);
}
#[repr(C)]
#[doc(hidden)]
pub struct IReferenceTrackerManager_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub ReferenceTrackingStarted: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub FindTrackerTargetsCompleted: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, findfailed: u8) -> ::windows::core::HRESULT,
pub ReferenceTrackingCompleted: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub SetReferenceTrackerHost: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IReferenceTrackerTarget(::windows::core::IUnknown);
impl IReferenceTrackerTarget {
pub unsafe fn AddRefFromReferenceTracker(&self) -> u32 {
(::windows::core::Interface::vtable(self).AddRefFromReferenceTracker)(::windows::core::Interface::as_raw(self))
}
pub unsafe fn ReleaseFromReferenceTracker(&self) -> u32 {
(::windows::core::Interface::vtable(self).ReleaseFromReferenceTracker)(::windows::core::Interface::as_raw(self))
}
pub unsafe fn Peg(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).Peg)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn Unpeg(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).Unpeg)(::windows::core::Interface::as_raw(self)).ok()
}
}
impl ::core::convert::From<IReferenceTrackerTarget> for ::windows::core::IUnknown {
fn from(value: IReferenceTrackerTarget) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a IReferenceTrackerTarget> for &'a ::windows::core::IUnknown {
fn from(value: &'a IReferenceTrackerTarget) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&IReferenceTrackerTarget> for ::windows::core::IUnknown {
fn from(value: &IReferenceTrackerTarget) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for IReferenceTrackerTarget {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for IReferenceTrackerTarget {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for IReferenceTrackerTarget {}
impl ::core::fmt::Debug for IReferenceTrackerTarget {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("IReferenceTrackerTarget").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for IReferenceTrackerTarget {
type Vtable = IReferenceTrackerTarget_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x64bd43f8_bfee_4ec4_b7eb_2935158dae21);
}
#[repr(C)]
#[doc(hidden)]
pub struct IReferenceTrackerTarget_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub AddRefFromReferenceTracker: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
pub ReleaseFromReferenceTracker: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> u32,
pub Peg: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub Unpeg: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISurfaceImageSourceManagerNative(::windows::core::IUnknown);
impl ISurfaceImageSourceManagerNative {
pub unsafe fn FlushAllSurfacesWithDevice<'a, P0>(&self, device: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IUnknown>>,
{
(::windows::core::Interface::vtable(self).FlushAllSurfacesWithDevice)(::windows::core::Interface::as_raw(self), device.into().abi()).ok()
}
}
impl ::core::convert::From<ISurfaceImageSourceManagerNative> for ::windows::core::IUnknown {
fn from(value: ISurfaceImageSourceManagerNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISurfaceImageSourceManagerNative> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISurfaceImageSourceManagerNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISurfaceImageSourceManagerNative> for ::windows::core::IUnknown {
fn from(value: &ISurfaceImageSourceManagerNative) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISurfaceImageSourceManagerNative {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISurfaceImageSourceManagerNative {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISurfaceImageSourceManagerNative {}
impl ::core::fmt::Debug for ISurfaceImageSourceManagerNative {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISurfaceImageSourceManagerNative").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISurfaceImageSourceManagerNative {
type Vtable = ISurfaceImageSourceManagerNative_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x4c8798b7_1d88_4a0f_b59b_b93f600de8c8);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISurfaceImageSourceManagerNative_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub FlushAllSurfacesWithDevice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, device: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISurfaceImageSourceNative(::windows::core::IUnknown);
impl ISurfaceImageSourceNative {
#[doc = "*Required features: `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub unsafe fn SetDevice<'a, P0>(&self, device: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Dxgi::IDXGIDevice>>,
{
(::windows::core::Interface::vtable(self).SetDevice)(::windows::core::Interface::as_raw(self), device.into().abi()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi"))]
pub unsafe fn BeginDraw(&self, updaterect: super::super::super::Foundation::RECT, surface: &mut ::core::option::Option<super::super::super::Graphics::Dxgi::IDXGISurface>, offset: &mut super::super::super::Foundation::POINT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).BeginDraw)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(updaterect), ::core::mem::transmute(surface), ::core::mem::transmute(offset)).ok()
}
pub unsafe fn EndDraw(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).EndDraw)(::windows::core::Interface::as_raw(self)).ok()
}
}
impl ::core::convert::From<ISurfaceImageSourceNative> for ::windows::core::IUnknown {
fn from(value: ISurfaceImageSourceNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISurfaceImageSourceNative> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISurfaceImageSourceNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISurfaceImageSourceNative> for ::windows::core::IUnknown {
fn from(value: &ISurfaceImageSourceNative) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISurfaceImageSourceNative {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISurfaceImageSourceNative {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISurfaceImageSourceNative {}
impl ::core::fmt::Debug for ISurfaceImageSourceNative {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISurfaceImageSourceNative").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISurfaceImageSourceNative {
type Vtable = ISurfaceImageSourceNative_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf2e9edc1_d307_4525_9886_0fafaa44163c);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISurfaceImageSourceNative_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub SetDevice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, device: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi"))]
SetDevice: usize,
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi"))]
pub BeginDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, updaterect: super::super::super::Foundation::RECT, surface: *mut *mut ::core::ffi::c_void, offset: *mut super::super::super::Foundation::POINT) -> ::windows::core::HRESULT,
#[cfg(not(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi")))]
BeginDraw: usize,
pub EndDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISurfaceImageSourceNativeWithD2D(::windows::core::IUnknown);
impl ISurfaceImageSourceNativeWithD2D {
pub unsafe fn SetDevice<'a, P0>(&self, device: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IUnknown>>,
{
(::windows::core::Interface::vtable(self).SetDevice)(::windows::core::Interface::as_raw(self), device.into().abi()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn BeginDraw<T>(&self, updaterect: &super::super::super::Foundation::RECT, offset: &mut super::super::super::Foundation::POINT) -> ::windows::core::Result<T>
where
T: ::windows::core::Interface,
{
let mut result__ = ::core::option::Option::None;
(::windows::core::Interface::vtable(self).BeginDraw)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(updaterect), &<T as ::windows::core::Interface>::IID, &mut result__ as *mut _ as *mut _, ::core::mem::transmute(offset)).and_some(result__)
}
pub unsafe fn EndDraw(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).EndDraw)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn SuspendDraw(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).SuspendDraw)(::windows::core::Interface::as_raw(self)).ok()
}
pub unsafe fn ResumeDraw(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).ResumeDraw)(::windows::core::Interface::as_raw(self)).ok()
}
}
impl ::core::convert::From<ISurfaceImageSourceNativeWithD2D> for ::windows::core::IUnknown {
fn from(value: ISurfaceImageSourceNativeWithD2D) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISurfaceImageSourceNativeWithD2D> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISurfaceImageSourceNativeWithD2D) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISurfaceImageSourceNativeWithD2D> for ::windows::core::IUnknown {
fn from(value: &ISurfaceImageSourceNativeWithD2D) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISurfaceImageSourceNativeWithD2D {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISurfaceImageSourceNativeWithD2D {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISurfaceImageSourceNativeWithD2D {}
impl ::core::fmt::Debug for ISurfaceImageSourceNativeWithD2D {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISurfaceImageSourceNativeWithD2D").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISurfaceImageSourceNativeWithD2D {
type Vtable = ISurfaceImageSourceNativeWithD2D_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x54298223_41e1_4a41_9c08_02e8256864a1);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISurfaceImageSourceNativeWithD2D_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub SetDevice: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, device: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(feature = "Win32_Foundation")]
pub BeginDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, updaterect: *const super::super::super::Foundation::RECT, iid: *const ::windows::core::GUID, updateobject: *mut *mut ::core::ffi::c_void, offset: *mut super::super::super::Foundation::POINT) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))]
BeginDraw: usize,
pub EndDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub SuspendDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub ResumeDraw: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISwapChainBackgroundPanelNative(::windows::core::IUnknown);
impl ISwapChainBackgroundPanelNative {
#[doc = "*Required features: `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub unsafe fn SetSwapChain<'a, P0>(&self, swapchain: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Dxgi::IDXGISwapChain>>,
{
(::windows::core::Interface::vtable(self).SetSwapChain)(::windows::core::Interface::as_raw(self), swapchain.into().abi()).ok()
}
}
impl ::core::convert::From<ISwapChainBackgroundPanelNative> for ::windows::core::IUnknown {
fn from(value: ISwapChainBackgroundPanelNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISwapChainBackgroundPanelNative> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISwapChainBackgroundPanelNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISwapChainBackgroundPanelNative> for ::windows::core::IUnknown {
fn from(value: &ISwapChainBackgroundPanelNative) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISwapChainBackgroundPanelNative {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISwapChainBackgroundPanelNative {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISwapChainBackgroundPanelNative {}
impl ::core::fmt::Debug for ISwapChainBackgroundPanelNative {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISwapChainBackgroundPanelNative").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISwapChainBackgroundPanelNative {
type Vtable = ISwapChainBackgroundPanelNative_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x43bebd4e_add5_4035_8f85_5608d08e9dc9);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISwapChainBackgroundPanelNative_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub SetSwapChain: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, swapchain: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi"))]
SetSwapChain: usize,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISwapChainPanelNative(::windows::core::IUnknown);
impl ISwapChainPanelNative {
#[doc = "*Required features: `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub unsafe fn SetSwapChain<'a, P0>(&self, swapchain: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Dxgi::IDXGISwapChain>>,
{
(::windows::core::Interface::vtable(self).SetSwapChain)(::windows::core::Interface::as_raw(self), swapchain.into().abi()).ok()
}
}
impl ::core::convert::From<ISwapChainPanelNative> for ::windows::core::IUnknown {
fn from(value: ISwapChainPanelNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISwapChainPanelNative> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISwapChainPanelNative) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISwapChainPanelNative> for ::windows::core::IUnknown {
fn from(value: &ISwapChainPanelNative) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISwapChainPanelNative {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISwapChainPanelNative {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISwapChainPanelNative {}
impl ::core::fmt::Debug for ISwapChainPanelNative {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISwapChainPanelNative").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISwapChainPanelNative {
type Vtable = ISwapChainPanelNative_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xf92f19d2_3ade_45a6_a20c_f6f1ea90554b);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISwapChainPanelNative_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub SetSwapChain: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, swapchain: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Graphics_Dxgi"))]
SetSwapChain: usize,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ISwapChainPanelNative2(::windows::core::IUnknown);
impl ISwapChainPanelNative2 {
#[doc = "*Required features: `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub unsafe fn SetSwapChain<'a, P0>(&self, swapchain: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Dxgi::IDXGISwapChain>>,
{
(::windows::core::Interface::vtable(self).base__.SetSwapChain)(::windows::core::Interface::as_raw(self), swapchain.into().abi()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`*"]
#[cfg(feature = "Win32_Foundation")]
pub unsafe fn SetSwapChainHandle<'a, P0>(&self, swapchainhandle: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<super::super::super::Foundation::HANDLE>,
{
(::windows::core::Interface::vtable(self).SetSwapChainHandle)(::windows::core::Interface::as_raw(self), swapchainhandle.into()).ok()
}
}
impl ::core::convert::From<ISwapChainPanelNative2> for ::windows::core::IUnknown {
fn from(value: ISwapChainPanelNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISwapChainPanelNative2> for &'a ::windows::core::IUnknown {
fn from(value: &'a ISwapChainPanelNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISwapChainPanelNative2> for ::windows::core::IUnknown {
fn from(value: &ISwapChainPanelNative2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::convert::From<ISwapChainPanelNative2> for ISwapChainPanelNative {
fn from(value: ISwapChainPanelNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ISwapChainPanelNative2> for &'a ISwapChainPanelNative {
fn from(value: &'a ISwapChainPanelNative2) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ISwapChainPanelNative2> for ISwapChainPanelNative {
fn from(value: &ISwapChainPanelNative2) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ISwapChainPanelNative2 {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ISwapChainPanelNative2 {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ISwapChainPanelNative2 {}
impl ::core::fmt::Debug for ISwapChainPanelNative2 {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ISwapChainPanelNative2").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ISwapChainPanelNative2 {
type Vtable = ISwapChainPanelNative2_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xd5a2f60c_37b2_44a2_937b_8d8eb9726821);
}
#[repr(C)]
#[doc(hidden)]
pub struct ISwapChainPanelNative2_Vtbl {
pub base__: ISwapChainPanelNative_Vtbl,
#[cfg(feature = "Win32_Foundation")]
pub SetSwapChainHandle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, swapchainhandle: super::super::super::Foundation::HANDLE) -> ::windows::core::HRESULT,
#[cfg(not(feature = "Win32_Foundation"))]
SetSwapChainHandle: usize,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct ITrackerOwner(::windows::core::IUnknown);
impl ITrackerOwner {
pub unsafe fn CreateTrackerHandle(&self) -> ::windows::core::Result<*mut TrackerHandle__> {
let mut result__ = ::core::mem::MaybeUninit::zeroed();
(::windows::core::Interface::vtable(self).CreateTrackerHandle)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(result__.as_mut_ptr())).from_abi::<*mut TrackerHandle__>(result__)
}
pub unsafe fn DeleteTrackerHandle(&self, handle: &TrackerHandle__) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).DeleteTrackerHandle)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(handle)).ok()
}
pub unsafe fn SetTrackerValue<'a, P0>(&self, handle: &TrackerHandle__, value: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, ::windows::core::IUnknown>>,
{
(::windows::core::Interface::vtable(self).SetTrackerValue)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(handle), value.into().abi()).ok()
}
pub unsafe fn TryGetSafeTrackerValue(&self, handle: &TrackerHandle__, returnvalue: &mut ::core::option::Option<::windows::core::IUnknown>) -> u8 {
(::windows::core::Interface::vtable(self).TryGetSafeTrackerValue)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(handle), ::core::mem::transmute(returnvalue))
}
}
impl ::core::convert::From<ITrackerOwner> for ::windows::core::IUnknown {
fn from(value: ITrackerOwner) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl<'a> ::core::convert::From<&'a ITrackerOwner> for &'a ::windows::core::IUnknown {
fn from(value: &'a ITrackerOwner) -> Self {
unsafe { ::core::mem::transmute(value) }
}
}
impl ::core::convert::From<&ITrackerOwner> for ::windows::core::IUnknown {
fn from(value: &ITrackerOwner) -> Self {
::core::convert::From::from(::core::clone::Clone::clone(value))
}
}
impl ::core::clone::Clone for ITrackerOwner {
fn clone(&self) -> Self {
Self(self.0.clone())
}
}
impl ::core::cmp::PartialEq for ITrackerOwner {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}
impl ::core::cmp::Eq for ITrackerOwner {}
impl ::core::fmt::Debug for ITrackerOwner {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
f.debug_tuple("ITrackerOwner").field(&self.0).finish()
}
}
unsafe impl ::windows::core::Interface for ITrackerOwner {
type Vtable = ITrackerOwner_Vtbl;
const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xeb24c20b_9816_4ac7_8cff_36f67a118f4e);
}
#[repr(C)]
#[doc(hidden)]
pub struct ITrackerOwner_Vtbl {
pub base__: ::windows::core::IUnknownVtbl,
pub CreateTrackerHandle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, returnvalue: *mut *mut TrackerHandle__) -> ::windows::core::HRESULT,
pub DeleteTrackerHandle: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handle: *const TrackerHandle__) -> ::windows::core::HRESULT,
pub SetTrackerValue: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handle: *const TrackerHandle__, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
pub TryGetSafeTrackerValue: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handle: *const TrackerHandle__, returnvalue: *mut *mut ::core::ffi::c_void) -> u8,
}
#[doc = "*Required features: `\"Win32_System_WinRT_Xaml\"`*"]
#[repr(transparent)]
pub struct IVirtualSurfaceImageSourceNative(::windows::core::IUnknown);
impl IVirtualSurfaceImageSourceNative {
#[doc = "*Required features: `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(feature = "Win32_Graphics_Dxgi")]
pub unsafe fn SetDevice<'a, P0>(&self, device: P0) -> ::windows::core::Result<()>
where
P0: ::std::convert::Into<::windows::core::InParam<'a, super::super::super::Graphics::Dxgi::IDXGIDevice>>,
{
(::windows::core::Interface::vtable(self).base__.SetDevice)(::windows::core::Interface::as_raw(self), device.into().abi()).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi\"`*"]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi"))]
pub unsafe fn BeginDraw(&self, updaterect: super::super::super::Foundation::RECT, surface: &mut ::core::option::Option<super::super::super::Graphics::Dxgi::IDXGISurface>, offset: &mut super::super::super::Foundation::POINT) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).base__.BeginDraw)(::windows::core::Interface::as_raw(self), ::core::mem::transmute(updaterect), ::core::mem::transmute(surface), ::core::mem::transmute(offset)).ok()
}
pub unsafe fn EndDraw(&self) -> ::windows::core::Result<()> {
(::windows::core::Interface::vtable(self).base__.EndDraw)(::windows::core::Interface::as_raw(self)).ok()
}
#[doc = "*Required features: `\"Win32_Foundation\"`*"]