pub struct GraphicsCapturePicker;展开描述
帮助使用系统 Graphics Capture Picker 提示用户选择窗口或监视器。
实现§
源码§impl GraphicsCapturePicker
impl GraphicsCapturePicker
源码pub fn pick_item() -> Result<Option<PickedGraphicsCaptureItem>, Error>
pub fn pick_item() -> Result<Option<PickedGraphicsCaptureItem>, Error>
显示系统 Graphics Capture Picker 对话框并返回新选择的项目。
会创建一个小型离屏工具窗口作为选择器的所有者,并通过 IInitializeWithWindow 初始化。在选择器可见期间,运行一个最小化的消息循绕循绕,以保持 UI 响应。
§返回
Ok(Some(PickedGraphicsCaptureItem))当用户选择了目标时Ok(None)当选择器未返回结果时
§Errors
Error::Canceled当用户取消选择器时Error::WindowsError当底层 Windows API 失败时
自动 trait 实现§
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 实现§
源码§impl<T> IntoEither for T
impl<T> IntoEither for T
源码§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
当
into_left 为 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多源码§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
当
into_left(&self) 返回 true 时,将 self 转换为
Left 变体的
Either<Self, Self>;
否则将其转换为
Right 变体的
Either<Self, Self>。 了解更多