[][src]Struct ashpd::WindowIdentifier

pub struct WindowIdentifier(_);

Most portals interact with the user by showing dialogs. These dialogs should generally be placed on top of the application window that triggered them. To arrange this, the compositor needs to know about the application window. Many portal requests expect a WindowIdentifier for this reason.

Under X11, the WindowIdentifier should have the form "x11:XID", where XID is the XID of the application window. Under Wayland, it should have the form "wayland:HANDLE", where HANDLE is a surface handle obtained with the xdg_foreign protocol.

For other windowing systems, or if you don't have a suitable handle, just use the Default implementation.

Normally, we should provide a From<gtk::Window> for WindowIdentifier implementation. But as that's currently impossible to do from Rust in a sane way, we should try to provide a C function that gives us a handle from the Gdk::Window and call it from Rust in the From implementation.

We would love merge requests that adds other From<T> for WindowIdentifier implementations for other toolkits.

Implementations

impl WindowIdentifier[src]

pub fn new(identifier: &str) -> Self[src]

Create a new window identifier

Trait Implementations

impl Clone for WindowIdentifier[src]

impl Debug for WindowIdentifier[src]

impl Default for WindowIdentifier[src]

impl<'de> Deserialize<'de> for WindowIdentifier[src]

impl Serialize for WindowIdentifier[src]

impl Type for WindowIdentifier[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.