]> git.proxmox.com Git - rustc.git/blame - vendor/windows/src/Windows/ApplicationModel/Preview/Notes/mod.rs
New upstream version 1.70.0+dfsg1
[rustc.git] / vendor / windows / src / Windows / ApplicationModel / Preview / Notes / mod.rs
CommitLineData
353b0b11
FG
1#[doc(hidden)]
2#[repr(transparent)]
3pub struct INotePlacementChangedPreviewEventArgs(::windows::core::IUnknown);
4unsafe impl ::windows::core::Interface for INotePlacementChangedPreviewEventArgs {
5 type Vtable = INotePlacementChangedPreviewEventArgs_Vtbl;
6}
7impl ::core::clone::Clone for INotePlacementChangedPreviewEventArgs {
8 fn clone(&self) -> Self {
9 Self(self.0.clone())
10 }
11}
12unsafe impl ::windows::core::ComInterface for INotePlacementChangedPreviewEventArgs {
13 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x491d57b7_f780_4e7f_a939_9a4caf965214);
14}
15#[repr(C)]
16#[doc(hidden)]
17pub struct INotePlacementChangedPreviewEventArgs_Vtbl {
18 pub base__: ::windows::core::IInspectable_Vtbl,
19 pub ViewId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
20}
21#[doc(hidden)]
22#[repr(transparent)]
23pub struct INoteVisibilityChangedPreviewEventArgs(::windows::core::IUnknown);
24unsafe impl ::windows::core::Interface for INoteVisibilityChangedPreviewEventArgs {
25 type Vtable = INoteVisibilityChangedPreviewEventArgs_Vtbl;
26}
27impl ::core::clone::Clone for INoteVisibilityChangedPreviewEventArgs {
28 fn clone(&self) -> Self {
29 Self(self.0.clone())
30 }
31}
32unsafe impl ::windows::core::ComInterface for INoteVisibilityChangedPreviewEventArgs {
33 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x0e34649e_3815_4ff6_83b3_a14d17120e24);
34}
35#[repr(C)]
36#[doc(hidden)]
37pub struct INoteVisibilityChangedPreviewEventArgs_Vtbl {
38 pub base__: ::windows::core::IInspectable_Vtbl,
39 pub ViewId: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT,
40 pub IsVisible: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
41}
42#[doc(hidden)]
43#[repr(transparent)]
44pub struct INotesWindowManagerPreview(::windows::core::IUnknown);
45unsafe impl ::windows::core::Interface for INotesWindowManagerPreview {
46 type Vtable = INotesWindowManagerPreview_Vtbl;
47}
48impl ::core::clone::Clone for INotesWindowManagerPreview {
49 fn clone(&self) -> Self {
50 Self(self.0.clone())
51 }
52}
53unsafe impl ::windows::core::ComInterface for INotesWindowManagerPreview {
54 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xdc2ac23e_4850_4f13_9cc7_ff487efdfcde);
55}
56#[repr(C)]
57#[doc(hidden)]
58pub struct INotesWindowManagerPreview_Vtbl {
59 pub base__: ::windows::core::IInspectable_Vtbl,
60 pub IsScreenLocked: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
61 pub ShowNote: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32) -> ::windows::core::HRESULT,
62 pub ShowNoteRelativeTo: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, anchornoteviewid: i32) -> ::windows::core::HRESULT,
63 #[cfg(feature = "Storage_Streams")]
64 pub ShowNoteWithPlacement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, data: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
65 #[cfg(not(feature = "Storage_Streams"))]
66 ShowNoteWithPlacement: usize,
67 pub HideNote: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32) -> ::windows::core::HRESULT,
68 #[cfg(feature = "Storage_Streams")]
69 pub GetNotePlacement: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
70 #[cfg(not(feature = "Storage_Streams"))]
71 GetNotePlacement: usize,
72 #[cfg(feature = "Foundation")]
73 pub TrySetNoteSize: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, size: super::super::super::Foundation::Size, result__: *mut bool) -> ::windows::core::HRESULT,
74 #[cfg(not(feature = "Foundation"))]
75 TrySetNoteSize: usize,
76 pub SetFocusToNextView: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
77 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
78 pub SetNotesThumbnailAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, thumbnail: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
79 #[cfg(not(all(feature = "Foundation", feature = "Storage_Streams")))]
80 SetNotesThumbnailAsync: usize,
81 #[cfg(feature = "Foundation")]
82 pub SystemLockStateChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
83 #[cfg(not(feature = "Foundation"))]
84 SystemLockStateChanged: usize,
85 #[cfg(feature = "Foundation")]
86 pub RemoveSystemLockStateChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
87 #[cfg(not(feature = "Foundation"))]
88 RemoveSystemLockStateChanged: usize,
89 #[cfg(feature = "Foundation")]
90 pub NotePlacementChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
91 #[cfg(not(feature = "Foundation"))]
92 NotePlacementChanged: usize,
93 #[cfg(feature = "Foundation")]
94 pub RemoveNotePlacementChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
95 #[cfg(not(feature = "Foundation"))]
96 RemoveNotePlacementChanged: usize,
97 #[cfg(feature = "Foundation")]
98 pub NoteVisibilityChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, handler: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
99 #[cfg(not(feature = "Foundation"))]
100 NoteVisibilityChanged: usize,
101 #[cfg(feature = "Foundation")]
102 pub RemoveNoteVisibilityChanged: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT,
103 #[cfg(not(feature = "Foundation"))]
104 RemoveNoteVisibilityChanged: usize,
105}
106#[doc(hidden)]
107#[repr(transparent)]
108pub struct INotesWindowManagerPreview2(::windows::core::IUnknown);
109unsafe impl ::windows::core::Interface for INotesWindowManagerPreview2 {
110 type Vtable = INotesWindowManagerPreview2_Vtbl;
111}
112impl ::core::clone::Clone for INotesWindowManagerPreview2 {
113 fn clone(&self) -> Self {
114 Self(self.0.clone())
115 }
116}
117unsafe impl ::windows::core::ComInterface for INotesWindowManagerPreview2 {
118 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0xedfe864a_1f54_4b09_9823_ff477f6fa3bc);
119}
120#[repr(C)]
121#[doc(hidden)]
122pub struct INotesWindowManagerPreview2_Vtbl {
123 pub base__: ::windows::core::IInspectable_Vtbl,
124 pub ShowNoteRelativeToWithOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, anchornoteviewid: i32, options: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
125 #[cfg(feature = "Storage_Streams")]
126 pub ShowNoteWithPlacementWithOptions: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, noteviewid: i32, data: *mut ::core::ffi::c_void, options: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
127 #[cfg(not(feature = "Storage_Streams"))]
128 ShowNoteWithPlacementWithOptions: usize,
129 pub SetFocusToPreviousView: unsafe extern "system" fn(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
130 #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))]
131 pub SetThumbnailImageForTaskSwitcherAsync: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, bitmap: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
132 #[cfg(not(all(feature = "Foundation", feature = "Graphics_Imaging")))]
133 SetThumbnailImageForTaskSwitcherAsync: usize,
134}
135#[doc(hidden)]
136#[repr(transparent)]
137pub struct INotesWindowManagerPreviewShowNoteOptions(::windows::core::IUnknown);
138unsafe impl ::windows::core::Interface for INotesWindowManagerPreviewShowNoteOptions {
139 type Vtable = INotesWindowManagerPreviewShowNoteOptions_Vtbl;
140}
141impl ::core::clone::Clone for INotesWindowManagerPreviewShowNoteOptions {
142 fn clone(&self) -> Self {
143 Self(self.0.clone())
144 }
145}
146unsafe impl ::windows::core::ComInterface for INotesWindowManagerPreviewShowNoteOptions {
147 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x886b09d6_a6ae_4007_a56d_1ca70c84c0d2);
148}
149#[repr(C)]
150#[doc(hidden)]
151pub struct INotesWindowManagerPreviewShowNoteOptions_Vtbl {
152 pub base__: ::windows::core::IInspectable_Vtbl,
153 pub ShowWithFocus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT,
154 pub SetShowWithFocus: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT,
155}
156#[doc(hidden)]
157#[repr(transparent)]
158pub struct INotesWindowManagerPreviewStatics(::windows::core::IUnknown);
159unsafe impl ::windows::core::Interface for INotesWindowManagerPreviewStatics {
160 type Vtable = INotesWindowManagerPreviewStatics_Vtbl;
161}
162impl ::core::clone::Clone for INotesWindowManagerPreviewStatics {
163 fn clone(&self) -> Self {
164 Self(self.0.clone())
165 }
166}
167unsafe impl ::windows::core::ComInterface for INotesWindowManagerPreviewStatics {
168 const IID: ::windows::core::GUID = ::windows::core::GUID::from_u128(0x6668cc88_0a8e_4127_a38e_995445868a78);
169}
170#[repr(C)]
171#[doc(hidden)]
172pub struct INotesWindowManagerPreviewStatics_Vtbl {
173 pub base__: ::windows::core::IInspectable_Vtbl,
174 pub GetForCurrentApp: unsafe extern "system" fn(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT,
175}
176#[doc = "*Required features: `\"ApplicationModel_Preview_Notes\"`*"]
177#[repr(transparent)]
178pub struct NotePlacementChangedPreviewEventArgs(::windows::core::IUnknown);
179impl NotePlacementChangedPreviewEventArgs {
180 pub fn ViewId(&self) -> ::windows::core::Result<i32> {
181 let this = self;
182 unsafe {
183 let mut result__ = ::windows::core::zeroed::<i32>();
184 (::windows::core::Interface::vtable(this).ViewId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
185 }
186 }
187}
188impl ::core::cmp::PartialEq for NotePlacementChangedPreviewEventArgs {
189 fn eq(&self, other: &Self) -> bool {
190 self.0 == other.0
191 }
192}
193impl ::core::cmp::Eq for NotePlacementChangedPreviewEventArgs {}
194impl ::core::fmt::Debug for NotePlacementChangedPreviewEventArgs {
195 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
196 f.debug_tuple("NotePlacementChangedPreviewEventArgs").field(&self.0).finish()
197 }
198}
199impl ::windows::core::RuntimeType for NotePlacementChangedPreviewEventArgs {
200 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Preview.Notes.NotePlacementChangedPreviewEventArgs;{491d57b7-f780-4e7f-a939-9a4caf965214})");
201}
202impl ::core::clone::Clone for NotePlacementChangedPreviewEventArgs {
203 fn clone(&self) -> Self {
204 Self(self.0.clone())
205 }
206}
207unsafe impl ::windows::core::Interface for NotePlacementChangedPreviewEventArgs {
208 type Vtable = INotePlacementChangedPreviewEventArgs_Vtbl;
209}
210unsafe impl ::windows::core::ComInterface for NotePlacementChangedPreviewEventArgs {
211 const IID: ::windows::core::GUID = <INotePlacementChangedPreviewEventArgs as ::windows::core::ComInterface>::IID;
212}
213impl ::windows::core::RuntimeName for NotePlacementChangedPreviewEventArgs {
214 const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotePlacementChangedPreviewEventArgs";
215}
216::windows::imp::interface_hierarchy!(NotePlacementChangedPreviewEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
217unsafe impl ::core::marker::Send for NotePlacementChangedPreviewEventArgs {}
218unsafe impl ::core::marker::Sync for NotePlacementChangedPreviewEventArgs {}
219#[doc = "*Required features: `\"ApplicationModel_Preview_Notes\"`*"]
220#[repr(transparent)]
221pub struct NoteVisibilityChangedPreviewEventArgs(::windows::core::IUnknown);
222impl NoteVisibilityChangedPreviewEventArgs {
223 pub fn ViewId(&self) -> ::windows::core::Result<i32> {
224 let this = self;
225 unsafe {
226 let mut result__ = ::windows::core::zeroed::<i32>();
227 (::windows::core::Interface::vtable(this).ViewId)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
228 }
229 }
230 pub fn IsVisible(&self) -> ::windows::core::Result<bool> {
231 let this = self;
232 unsafe {
233 let mut result__ = ::windows::core::zeroed::<bool>();
234 (::windows::core::Interface::vtable(this).IsVisible)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
235 }
236 }
237}
238impl ::core::cmp::PartialEq for NoteVisibilityChangedPreviewEventArgs {
239 fn eq(&self, other: &Self) -> bool {
240 self.0 == other.0
241 }
242}
243impl ::core::cmp::Eq for NoteVisibilityChangedPreviewEventArgs {}
244impl ::core::fmt::Debug for NoteVisibilityChangedPreviewEventArgs {
245 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
246 f.debug_tuple("NoteVisibilityChangedPreviewEventArgs").field(&self.0).finish()
247 }
248}
249impl ::windows::core::RuntimeType for NoteVisibilityChangedPreviewEventArgs {
250 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs;{0e34649e-3815-4ff6-83b3-a14d17120e24})");
251}
252impl ::core::clone::Clone for NoteVisibilityChangedPreviewEventArgs {
253 fn clone(&self) -> Self {
254 Self(self.0.clone())
255 }
256}
257unsafe impl ::windows::core::Interface for NoteVisibilityChangedPreviewEventArgs {
258 type Vtable = INoteVisibilityChangedPreviewEventArgs_Vtbl;
259}
260unsafe impl ::windows::core::ComInterface for NoteVisibilityChangedPreviewEventArgs {
261 const IID: ::windows::core::GUID = <INoteVisibilityChangedPreviewEventArgs as ::windows::core::ComInterface>::IID;
262}
263impl ::windows::core::RuntimeName for NoteVisibilityChangedPreviewEventArgs {
264 const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NoteVisibilityChangedPreviewEventArgs";
265}
266::windows::imp::interface_hierarchy!(NoteVisibilityChangedPreviewEventArgs, ::windows::core::IUnknown, ::windows::core::IInspectable);
267unsafe impl ::core::marker::Send for NoteVisibilityChangedPreviewEventArgs {}
268unsafe impl ::core::marker::Sync for NoteVisibilityChangedPreviewEventArgs {}
269#[doc = "*Required features: `\"ApplicationModel_Preview_Notes\"`*"]
270#[repr(transparent)]
271pub struct NotesWindowManagerPreview(::windows::core::IUnknown);
272impl NotesWindowManagerPreview {
273 pub fn IsScreenLocked(&self) -> ::windows::core::Result<bool> {
274 let this = self;
275 unsafe {
276 let mut result__ = ::windows::core::zeroed::<bool>();
277 (::windows::core::Interface::vtable(this).IsScreenLocked)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
278 }
279 }
280 pub fn ShowNote(&self, noteviewid: i32) -> ::windows::core::Result<()> {
281 let this = self;
282 unsafe { (::windows::core::Interface::vtable(this).ShowNote)(::windows::core::Interface::as_raw(this), noteviewid).ok() }
283 }
284 pub fn ShowNoteRelativeTo(&self, noteviewid: i32, anchornoteviewid: i32) -> ::windows::core::Result<()> {
285 let this = self;
286 unsafe { (::windows::core::Interface::vtable(this).ShowNoteRelativeTo)(::windows::core::Interface::as_raw(this), noteviewid, anchornoteviewid).ok() }
287 }
288 #[doc = "*Required features: `\"Storage_Streams\"`*"]
289 #[cfg(feature = "Storage_Streams")]
290 pub fn ShowNoteWithPlacement<P0>(&self, noteviewid: i32, data: P0) -> ::windows::core::Result<()>
291 where
292 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
293 {
294 let this = self;
295 unsafe { (::windows::core::Interface::vtable(this).ShowNoteWithPlacement)(::windows::core::Interface::as_raw(this), noteviewid, data.try_into_param()?.abi()).ok() }
296 }
297 pub fn HideNote(&self, noteviewid: i32) -> ::windows::core::Result<()> {
298 let this = self;
299 unsafe { (::windows::core::Interface::vtable(this).HideNote)(::windows::core::Interface::as_raw(this), noteviewid).ok() }
300 }
301 #[doc = "*Required features: `\"Storage_Streams\"`*"]
302 #[cfg(feature = "Storage_Streams")]
303 pub fn GetNotePlacement(&self, noteviewid: i32) -> ::windows::core::Result<super::super::super::Storage::Streams::IBuffer> {
304 let this = self;
305 unsafe {
306 let mut result__ = ::windows::core::zeroed::<super::super::super::Storage::Streams::IBuffer>();
307 (::windows::core::Interface::vtable(this).GetNotePlacement)(::windows::core::Interface::as_raw(this), noteviewid, &mut result__).from_abi(result__)
308 }
309 }
310 #[doc = "*Required features: `\"Foundation\"`*"]
311 #[cfg(feature = "Foundation")]
312 pub fn TrySetNoteSize(&self, noteviewid: i32, size: super::super::super::Foundation::Size) -> ::windows::core::Result<bool> {
313 let this = self;
314 unsafe {
315 let mut result__ = ::windows::core::zeroed::<bool>();
316 (::windows::core::Interface::vtable(this).TrySetNoteSize)(::windows::core::Interface::as_raw(this), noteviewid, size, &mut result__).from_abi(result__)
317 }
318 }
319 pub fn SetFocusToNextView(&self) -> ::windows::core::Result<()> {
320 let this = self;
321 unsafe { (::windows::core::Interface::vtable(this).SetFocusToNextView)(::windows::core::Interface::as_raw(this)).ok() }
322 }
323 #[doc = "*Required features: `\"Foundation\"`, `\"Storage_Streams\"`*"]
324 #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))]
325 pub fn SetNotesThumbnailAsync<P0>(&self, thumbnail: P0) -> ::windows::core::Result<super::super::super::Foundation::IAsyncAction>
326 where
327 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
328 {
329 let this = self;
330 unsafe {
331 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncAction>();
332 (::windows::core::Interface::vtable(this).SetNotesThumbnailAsync)(::windows::core::Interface::as_raw(this), thumbnail.try_into_param()?.abi(), &mut result__).from_abi(result__)
333 }
334 }
335 #[doc = "*Required features: `\"Foundation\"`*"]
336 #[cfg(feature = "Foundation")]
337 pub fn SystemLockStateChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, ::windows::core::IInspectable>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
338 let this = self;
339 unsafe {
340 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
341 (::windows::core::Interface::vtable(this).SystemLockStateChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
342 }
343 }
344 #[doc = "*Required features: `\"Foundation\"`*"]
345 #[cfg(feature = "Foundation")]
346 pub fn RemoveSystemLockStateChanged(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
347 let this = self;
348 unsafe { (::windows::core::Interface::vtable(this).RemoveSystemLockStateChanged)(::windows::core::Interface::as_raw(this), token).ok() }
349 }
350 #[doc = "*Required features: `\"Foundation\"`*"]
351 #[cfg(feature = "Foundation")]
352 pub fn NotePlacementChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, NotePlacementChangedPreviewEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
353 let this = self;
354 unsafe {
355 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
356 (::windows::core::Interface::vtable(this).NotePlacementChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
357 }
358 }
359 #[doc = "*Required features: `\"Foundation\"`*"]
360 #[cfg(feature = "Foundation")]
361 pub fn RemoveNotePlacementChanged(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
362 let this = self;
363 unsafe { (::windows::core::Interface::vtable(this).RemoveNotePlacementChanged)(::windows::core::Interface::as_raw(this), token).ok() }
364 }
365 #[doc = "*Required features: `\"Foundation\"`*"]
366 #[cfg(feature = "Foundation")]
367 pub fn NoteVisibilityChanged(&self, handler: &super::super::super::Foundation::TypedEventHandler<NotesWindowManagerPreview, NoteVisibilityChangedPreviewEventArgs>) -> ::windows::core::Result<super::super::super::Foundation::EventRegistrationToken> {
368 let this = self;
369 unsafe {
370 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::EventRegistrationToken>();
371 (::windows::core::Interface::vtable(this).NoteVisibilityChanged)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(handler), &mut result__).from_abi(result__)
372 }
373 }
374 #[doc = "*Required features: `\"Foundation\"`*"]
375 #[cfg(feature = "Foundation")]
376 pub fn RemoveNoteVisibilityChanged(&self, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::Result<()> {
377 let this = self;
378 unsafe { (::windows::core::Interface::vtable(this).RemoveNoteVisibilityChanged)(::windows::core::Interface::as_raw(this), token).ok() }
379 }
380 pub fn ShowNoteRelativeToWithOptions(&self, noteviewid: i32, anchornoteviewid: i32, options: &NotesWindowManagerPreviewShowNoteOptions) -> ::windows::core::Result<()> {
381 let this = &::windows::core::ComInterface::cast::<INotesWindowManagerPreview2>(self)?;
382 unsafe { (::windows::core::Interface::vtable(this).ShowNoteRelativeToWithOptions)(::windows::core::Interface::as_raw(this), noteviewid, anchornoteviewid, ::core::mem::transmute_copy(options)).ok() }
383 }
384 #[doc = "*Required features: `\"Storage_Streams\"`*"]
385 #[cfg(feature = "Storage_Streams")]
386 pub fn ShowNoteWithPlacementWithOptions<P0>(&self, noteviewid: i32, data: P0, options: &NotesWindowManagerPreviewShowNoteOptions) -> ::windows::core::Result<()>
387 where
388 P0: ::windows::core::TryIntoParam<super::super::super::Storage::Streams::IBuffer>,
389 {
390 let this = &::windows::core::ComInterface::cast::<INotesWindowManagerPreview2>(self)?;
391 unsafe { (::windows::core::Interface::vtable(this).ShowNoteWithPlacementWithOptions)(::windows::core::Interface::as_raw(this), noteviewid, data.try_into_param()?.abi(), ::core::mem::transmute_copy(options)).ok() }
392 }
393 pub fn SetFocusToPreviousView(&self) -> ::windows::core::Result<()> {
394 let this = &::windows::core::ComInterface::cast::<INotesWindowManagerPreview2>(self)?;
395 unsafe { (::windows::core::Interface::vtable(this).SetFocusToPreviousView)(::windows::core::Interface::as_raw(this)).ok() }
396 }
397 #[doc = "*Required features: `\"Foundation\"`, `\"Graphics_Imaging\"`*"]
398 #[cfg(all(feature = "Foundation", feature = "Graphics_Imaging"))]
399 pub fn SetThumbnailImageForTaskSwitcherAsync(&self, bitmap: &super::super::super::Graphics::Imaging::SoftwareBitmap) -> ::windows::core::Result<super::super::super::Foundation::IAsyncAction> {
400 let this = &::windows::core::ComInterface::cast::<INotesWindowManagerPreview2>(self)?;
401 unsafe {
402 let mut result__ = ::windows::core::zeroed::<super::super::super::Foundation::IAsyncAction>();
403 (::windows::core::Interface::vtable(this).SetThumbnailImageForTaskSwitcherAsync)(::windows::core::Interface::as_raw(this), ::core::mem::transmute_copy(bitmap), &mut result__).from_abi(result__)
404 }
405 }
406 pub fn GetForCurrentApp() -> ::windows::core::Result<NotesWindowManagerPreview> {
407 Self::INotesWindowManagerPreviewStatics(|this| unsafe {
408 let mut result__ = ::windows::core::zeroed::<NotesWindowManagerPreview>();
409 (::windows::core::Interface::vtable(this).GetForCurrentApp)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
410 })
411 }
412 #[doc(hidden)]
413 pub fn INotesWindowManagerPreviewStatics<R, F: FnOnce(&INotesWindowManagerPreviewStatics) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
414 static SHARED: ::windows::imp::FactoryCache<NotesWindowManagerPreview, INotesWindowManagerPreviewStatics> = ::windows::imp::FactoryCache::new();
415 SHARED.call(callback)
416 }
417}
418impl ::core::cmp::PartialEq for NotesWindowManagerPreview {
419 fn eq(&self, other: &Self) -> bool {
420 self.0 == other.0
421 }
422}
423impl ::core::cmp::Eq for NotesWindowManagerPreview {}
424impl ::core::fmt::Debug for NotesWindowManagerPreview {
425 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
426 f.debug_tuple("NotesWindowManagerPreview").field(&self.0).finish()
427 }
428}
429impl ::windows::core::RuntimeType for NotesWindowManagerPreview {
430 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview;{dc2ac23e-4850-4f13-9cc7-ff487efdfcde})");
431}
432impl ::core::clone::Clone for NotesWindowManagerPreview {
433 fn clone(&self) -> Self {
434 Self(self.0.clone())
435 }
436}
437unsafe impl ::windows::core::Interface for NotesWindowManagerPreview {
438 type Vtable = INotesWindowManagerPreview_Vtbl;
439}
440unsafe impl ::windows::core::ComInterface for NotesWindowManagerPreview {
441 const IID: ::windows::core::GUID = <INotesWindowManagerPreview as ::windows::core::ComInterface>::IID;
442}
443impl ::windows::core::RuntimeName for NotesWindowManagerPreview {
444 const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreview";
445}
446::windows::imp::interface_hierarchy!(NotesWindowManagerPreview, ::windows::core::IUnknown, ::windows::core::IInspectable);
447unsafe impl ::core::marker::Send for NotesWindowManagerPreview {}
448unsafe impl ::core::marker::Sync for NotesWindowManagerPreview {}
449#[doc = "*Required features: `\"ApplicationModel_Preview_Notes\"`*"]
450#[repr(transparent)]
451pub struct NotesWindowManagerPreviewShowNoteOptions(::windows::core::IUnknown);
452impl NotesWindowManagerPreviewShowNoteOptions {
453 pub fn new() -> ::windows::core::Result<Self> {
454 Self::IActivationFactory(|f| f.ActivateInstance::<Self>())
455 }
456 fn IActivationFactory<R, F: FnOnce(&::windows::imp::IGenericFactory) -> ::windows::core::Result<R>>(callback: F) -> ::windows::core::Result<R> {
457 static SHARED: ::windows::imp::FactoryCache<NotesWindowManagerPreviewShowNoteOptions, ::windows::imp::IGenericFactory> = ::windows::imp::FactoryCache::new();
458 SHARED.call(callback)
459 }
460 pub fn ShowWithFocus(&self) -> ::windows::core::Result<bool> {
461 let this = self;
462 unsafe {
463 let mut result__ = ::windows::core::zeroed::<bool>();
464 (::windows::core::Interface::vtable(this).ShowWithFocus)(::windows::core::Interface::as_raw(this), &mut result__).from_abi(result__)
465 }
466 }
467 pub fn SetShowWithFocus(&self, value: bool) -> ::windows::core::Result<()> {
468 let this = self;
469 unsafe { (::windows::core::Interface::vtable(this).SetShowWithFocus)(::windows::core::Interface::as_raw(this), value).ok() }
470 }
471}
472impl ::core::cmp::PartialEq for NotesWindowManagerPreviewShowNoteOptions {
473 fn eq(&self, other: &Self) -> bool {
474 self.0 == other.0
475 }
476}
477impl ::core::cmp::Eq for NotesWindowManagerPreviewShowNoteOptions {}
478impl ::core::fmt::Debug for NotesWindowManagerPreviewShowNoteOptions {
479 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
480 f.debug_tuple("NotesWindowManagerPreviewShowNoteOptions").field(&self.0).finish()
481 }
482}
483impl ::windows::core::RuntimeType for NotesWindowManagerPreviewShowNoteOptions {
484 const SIGNATURE: ::windows::imp::ConstBuffer = ::windows::imp::ConstBuffer::from_slice(b"rc(Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions;{886b09d6-a6ae-4007-a56d-1ca70c84c0d2})");
485}
486impl ::core::clone::Clone for NotesWindowManagerPreviewShowNoteOptions {
487 fn clone(&self) -> Self {
488 Self(self.0.clone())
489 }
490}
491unsafe impl ::windows::core::Interface for NotesWindowManagerPreviewShowNoteOptions {
492 type Vtable = INotesWindowManagerPreviewShowNoteOptions_Vtbl;
493}
494unsafe impl ::windows::core::ComInterface for NotesWindowManagerPreviewShowNoteOptions {
495 const IID: ::windows::core::GUID = <INotesWindowManagerPreviewShowNoteOptions as ::windows::core::ComInterface>::IID;
496}
497impl ::windows::core::RuntimeName for NotesWindowManagerPreviewShowNoteOptions {
498 const NAME: &'static str = "Windows.ApplicationModel.Preview.Notes.NotesWindowManagerPreviewShowNoteOptions";
499}
500::windows::imp::interface_hierarchy!(NotesWindowManagerPreviewShowNoteOptions, ::windows::core::IUnknown, ::windows::core::IInspectable);
501unsafe impl ::core::marker::Send for NotesWindowManagerPreviewShowNoteOptions {}
502unsafe impl ::core::marker::Sync for NotesWindowManagerPreviewShowNoteOptions {}
503#[cfg(feature = "implement")]
504::core::include!("impl.rs");