[][src]Struct wayland_protocols::xdg_shell::client::xdg_popup::XdgPopup

pub struct XdgPopup(_);

Implementations

impl XdgPopup[src]

pub fn destroy(&self)[src]

remove xdg_popup interface

This destroys the popup. Explicitly destroying the xdg_popup object will also dismiss the popup, and unmap the surface.

If this xdg_popup is not the "topmost" popup, a protocol error will be sent.

This is a destructor, you cannot send requests to this object any longer once this method is called.

pub fn grab(&self, seat: &WlSeat, serial: u32)[src]

make the popup take an explicit grab

This request makes the created popup take an explicit grab. An explicit grab will be dismissed when the user dismisses the popup, or when the client destroys the xdg_popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout.

If the compositor denies the grab, the popup will be immediately dismissed.

This request must be used in response to some sort of user action like a button press, key press, or touch down event. The serial number of the event should be passed as 'serial'.

The parent of a grabbing popup must either be an xdg_toplevel surface or another xdg_popup with an explicit grab. If the parent is another xdg_popup it means that the popups are nested, with this popup now being the topmost popup.

Nested popups must be destroyed in the reverse order they were created in, e.g. the only popup you are allowed to destroy at all times is the topmost one.

When compositors choose to dismiss a popup, they may dismiss every nested grabbing popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client.

The parent of a grabbing popup must either be another xdg_popup with an active explicit grab, or an xdg_popup or xdg_toplevel, if there are no explicit grabs already taken.

If the topmost grabbing popup is destroyed, the grab will be returned to the parent of the popup, if that parent previously had an explicit grab.

If the parent is a grabbing popup which has already been dismissed, this popup will be immediately dismissed. If the parent is a popup that did not take an explicit grab, an error will be raised.

During a popup grab, the client owning the grab will receive pointer and touch events for all their surfaces as normal (similar to an "owner-events" grab in X11 parlance), while the top most grabbing popup will always have keyboard focus.

pub fn reposition(&self, positioner: &XdgPositioner, token: u32)[src]

recalculate the popup's location

Reposition an already-mapped popup. The popup will be placed given the details in the passed xdg_positioner object, and a xdg_popup.repositioned followed by xdg_popup.configure and xdg_surface.configure will be emitted in response. Any parameters set by the previous positioner will be discarded.

The passed token will be sent in the corresponding xdg_popup.repositioned event. The new popup position will not take effect until the corresponding configure event is acknowledged by the client. See xdg_popup.repositioned for details. The token itself is opaque, and has no other special meaning.

If multiple reposition requests are sent, the compositor may skip all but the last one.

If the popup is repositioned in response to a configure event for its parent, the client should send an xdg_positioner.set_parent_configure and possibly a xdg_positioner.set_parent_size request to allow the compositor to properly constrain the popup.

If the popup is repositioned together with a parent that is being resized, but not in response to a configure event, the client should send a xdg_positioner.set_parent_size request.

Only available since version 3 of the interface.

Trait Implementations

impl AsRef<Proxy<XdgPopup>> for XdgPopup[src]

impl Clone for XdgPopup[src]

impl Debug for XdgPopup[src]

impl Eq for XdgPopup[src]

impl From<Proxy<XdgPopup>> for XdgPopup[src]

impl From<XdgPopup> for Proxy<XdgPopup>[src]

impl Interface for XdgPopup[src]

type Request = Request

Set of requests associated to this interface Read more

type Event = Event

Set of events associated to this interface Read more

impl PartialEq<XdgPopup> for XdgPopup[src]

impl StructuralEq for XdgPopup[src]

impl StructuralPartialEq for XdgPopup[src]

Auto Trait Implementations

impl !RefUnwindSafe for XdgPopup

impl Send for XdgPopup

impl Sync for XdgPopup

impl Unpin for XdgPopup

impl !UnwindSafe for XdgPopup

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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.