pub fn add_pointer<F>(&mut self, cb: F) -> PointerHandle
    where
        F: FnMut(CursorImageStatus) + 'static,
    {
        let mut inner = self.arc.inner.borrow_mut();
        let pointer = self::pointer::create_pointer_handler(cb);
        if inner.pointer.is_some() {
            // there is already a pointer, remove it and notify the clients
            // of the change
            inner.pointer = None;
            inner.send_all_caps();
        }
        inner.pointer = Some(pointer.clone());
        inner.send_all_caps();
        pointer
    }
/// Adds the pointer capability to this seat
///
/// You are provided a [`PointerHandle`], which allows you to send input events
/// to this pointer. This handle can be cloned.
///
/// Calling this method on a seat that already has a pointer capability
/// will overwrite it, and will be seen by the clients as if the
/// mouse was unplugged and a new one was plugged.
///
/// You need to provide a callback that will be notified whenever a client requests
/// to set a custom cursor image.
///
/// # Examples
///
/// ```
/// # extern crate wayland_server;
/// #
/// # use smithay::wayland::seat::Seat;
/// #
/// # let mut display = wayland_server::Display::new();
/// # let (mut seat, seat_global) = Seat::new(
/// #     &mut display,
/// #     "seat-0".into(),
/// #     None
/// # );
/// let pointer_handle = seat.add_pointer(
///     |new_status| { /* a closure handling requests from clients to change the cursor icon */ }
/// );
/// ```
Adds the pointer capability to this seat
You are provided a [`PointerHandle`], which allows you to send input events
to this pointer. This handle can be cloned.

Calling this method on a seat that already has a pointer capability
will overwrite it, and will be seen by the clients as if the
mouse was unplugged and a new one was plugged.

You need to provide a callback that will be notified whenever a client requests
to set a custom cursor image.
Adds the pointer capability to this seat You are provided a [ ` PointerHandle ` ] which allows you to send input events to this pointer . This handle can be cloned . Calling this method on a seat that already has a pointer capability will overwrite it and will be seen by the clients as if the mouse was unplugged and a new one was plugged . You need to provide a callback that will be notified whenever a client requests to set a custom cursor image .
pub fn add_pointer<F>(&mut self, cb: F) -> PointerHandle
    where
        F: FnMut(CursorImageStatus) + 'static,
    {
        let mut inner = self.arc.inner.borrow_mut();
        let pointer = self::pointer::create_pointer_handler(cb);
        if inner.pointer.is_some() {
            // there is already a pointer, remove it and notify the clients
            // of the change
            inner.pointer = None;
            inner.send_all_caps();
        }
        inner.pointer = Some(pointer.clone());
        inner.send_all_caps();
        pointer
    }
pub fn add_pointer < F > ( & mut self , cb : F ) -> PointerHandle where F : FnMut ( CursorImageStatus ) + ' static , { let mut inner = self . arc . inner . borrow_mut ( ) ; let pointer = self :: pointer :: create_pointer_handler ( cb ) ; if inner . pointer . is_some ( ) { // there is already a pointer, remove it and notify the clients // of the change inner . pointer = None ; inner . send_all_caps ( ) ; } inner . pointer = Some ( pointer . clone ( ) ) ; inner . send_all_caps ( ) ; pointer }
Adds the pointer capability to this seat
You are provided a [`PointerHandle`], which allows you to send input events
to this pointer.
Adds the pointer capability to this seat You are provided a [ ` PointerHandle ` ] which allows you to send input events to this pointer .
&mut self
cb
F
&mut self
cb
F
examples
None
extern crate wayland_server;
None
use smithay::wayland::seat::seat;
None
let mut display = wayland_server::display::new();
None
let (mut seat, seat_global) = seat::new(
None
&mut display,
None
"seat-0".into(),
None
none
None
);
let pointer_handle = seat.add_pointer(
|new_status| {  a closure handling requests from clients to change the cursor icon */ }
);
```
let pointer_handle = seat . add_pointer ( |new_status| { a closure handling requests from clients to change the cursor icon * / } ) ; ` ` `