pub fn new(
        xdg_surface_ref: ObjectRef<XdgSurface>,
        client: &mut Client,
        session: ScenicSession,
    ) -> Result<Self, Error> {
        let surface_ref = xdg_surface_ref.get(client)?.surface_ref();
        surface_ref.get_mut(client)?.set_session(session)?;
        Ok(XdgToplevel {
            surface_ref,
            xdg_surface_ref,
            view: None,
            view_provider_controller: None,
            session_listener_controller: None,
            view_id: NEXT_VIEW_ID.fetch_add(1, Ordering::SeqCst) as u32,
        })
    }
/// Creates a new `XdgToplevel` surface.
Creates a new `XdgToplevel` surface.
Creates a new ` XdgToplevel ` surface .
pub fn new(
        xdg_surface_ref: ObjectRef<XdgSurface>,
        client: &mut Client,
        session: ScenicSession,
    ) -> Result<Self, Error> {
        let surface_ref = xdg_surface_ref.get(client)?.surface_ref();
        surface_ref.get_mut(client)?.set_session(session)?;
        Ok(XdgToplevel {
            surface_ref,
            xdg_surface_ref,
            view: None,
            view_provider_controller: None,
            session_listener_controller: None,
            view_id: NEXT_VIEW_ID.fetch_add(1, Ordering::SeqCst) as u32,
        })
    }
pub fn new ( xdg_surface_ref : ObjectRef < XdgSurface > , client : & mut Client , session : ScenicSession , ) -> Result < Self , Error > { let surface_ref = xdg_surface_ref . get ( client ) ? . surface_ref ( ) ; surface_ref . get_mut ( client ) ? . set_session ( session ) ? ; Ok ( XdgToplevel { surface_ref , xdg_surface_ref , view : None , view_provider_controller : None , session_listener_controller : None , view_id : NEXT_VIEW_ID . fetch_add ( 1 , Ordering :: SeqCst ) as u32 , } ) }
Creates a new `XdgToplevel` surface.
Creates a new ` XdgToplevel ` surface .
xdg_surface_ref
ObjectRef<XdgSurface>
client
&mut Client
session
ScenicSession
xdg_surface_ref
ObjectRef<XdgSurface>
client
&mut Client
session
ScenicSession