/// bind an object to the display
///
/// Binds a new, client-created object to the server using the
/// specified name as the identifier.
bind an object to the display
Binds a new, client-created object to the server using the
specified name as the identifier.
bind an object to the display Binds a new client - created object to the server using the specified name as the identifier .
pub unsafe fn bind<T: Proxy>(&self, name: u32,version: u32,) -> T {
        if version > <T as Proxy>::version() {
            panic!("Tried to bind interface {} with version {} while it is only supported up to {}.", <T as Proxy>::interface_name(), version, <T as Proxy>::version())
        }
        let ptr = unsafe { ffi_dispatch!(WAYLAND_CLIENT_HANDLE, wl_proxy_marshal_constructor, self.ptr(), WL_REGISTRY_BIND, <T as Proxy>::interface()
           , name, (*<T as Proxy>::interface()).name, version, ptr::null_mut::<wl_proxy>()) };
        let mut proxy: T = unsafe { Proxy::from_ptr(ptr) };
        let evt_iter = eventiter_from_internals(self.evq.clone());
        proxy.set_evt_iterator(&evt_iter);
        ::std::mem::forget(evt_iter); // Don't run the destructor !
        proxy
    }
pub unsafe fn bind < T : Proxy > ( & self , name : u32 , version : u32 , ) -> T { if version > < T as Proxy > :: version ( ) { panic ! ( " " T as Proxy interface_name ( ) version T as Proxy version ( ) ) } let ptr = unsafe { ffi_dispatch ! ( WAYLAND_CLIENT_HANDLE wl_proxy_marshal_constructor self ptr ( ) WL_REGISTRY_BIND T as Proxy interface ( ) name ( T as Proxy interface ( ) ) name version ptr null_mut wl_proxy ( ) ) } ; let mut proxy : T = unsafe { Proxy :: from_ptr ( ptr ) } ; let evt_iter = eventiter_from_internals ( self . evq . clone ( ) ) ; proxy . set_evt_iterator ( & evt_iter ) ; :: std :: mem :: forget ( evt_iter ) ; // Don't run the destructor ! proxy }
bind an object to the display
Binds a new, client-created object to the server using the
specified name as the identifier.
bind an object to the display Binds a new client - created object to the server using the specified name as the identifier .
&self
name
u32
version
u32