pub struct GraphicsCapturePicker;Expand description
Helper for prompting the user to pick a window or monitor using the system Graphics Capture Picker.
Implementationsยง
Sourceยงimpl GraphicsCapturePicker
impl GraphicsCapturePicker
Sourcepub fn pick_item() -> Result<Option<PickedGraphicsCaptureItem>, Error>
pub fn pick_item() -> Result<Option<PickedGraphicsCaptureItem>, Error>
Shows the system Graphics Capture Picker dialog and returns the chosen item.
A tiny, off-screen tool window is created as the picker owner and initialized
via IInitializeWithWindow. While the picker is visible, a minimal message
pump is run to keep the UI responsive.
ยงReturns
Ok(Some(PickedGraphicsCaptureItem))if the user selects a targetOk(None)if the picker completes without a result
ยงErrors
Error::Canceledwhen the user cancels the pickerError::WindowsErrorfor underlying Windows API failures
Auto Trait Implementationsยง
impl Freeze for GraphicsCapturePicker
impl RefUnwindSafe for GraphicsCapturePicker
impl Send for GraphicsCapturePicker
impl Sync for GraphicsCapturePicker
impl Unpin for GraphicsCapturePicker
impl UnsafeUnpin for GraphicsCapturePicker
impl UnwindSafe for GraphicsCapturePicker
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more